Top and Bottom 10 Products by Sales Using RANKX in Power BI

Sdílet
Vložit
  • čas přidán 30. 07. 2024
  • Started from the bottom now we're here. In this Power BI dashboard tutorial, I will demonstrate how to visualize the Top 10 and Bottom products by Sales using the RANKX function, not the visual TOP N filter. We'll also use DAX to create a calendar table that will lend some interactivity to the viz.
    ★☆★ Join this channel to get access to perks: ★☆★
    / @anthonysmoak
    ★☆★ SUBSCRIBE TO ME ON CZcams: ★☆★
    Subscribe ► / anthonysmoak
    ★☆★ FOLLOW ME BELOW: ★☆★
    Blog ► anthonysmoak.com/
    Twitter ► / anthonysmoak
    Facebook ► / anthonybsmoak
    Thanks for your support!

Komentáře • 16

  • @sravankumar1767
    @sravankumar1767 Před 3 lety +1

    Nice explanation.Awesome

  • @aas2943
    @aas2943 Před 3 lety +2

    it was highly informative....good work !!!!
    it would be a great help if i get the link for dataset and pbix file

  • @juansuarez2123
    @juansuarez2123 Před 3 lety +1

    Thank u'

  • @chrisschley8012
    @chrisschley8012 Před rokem +1

    very helpful video, thanks!!

  • @Oscarrudnas
    @Oscarrudnas Před 4 lety

    The sum om the table does not work though.

  • @corradomazzoni4519
    @corradomazzoni4519 Před 3 lety

    Nice video: there is only 1 remark. This video shows the correct values in the graphs, but the table reports as sum of the TOP10 the SUM of the entire column. A different context is needed in the formula to have also the SUM of TOP10 and have their share compared to the total Sales.
    To fix it, instead of the IF clause, you can use CALCULATE and add the RANKX as FILTER clause.

    • @AnthonySmoak
      @AnthonySmoak  Před 3 lety

      Good comment. The intent of this video was to visualize the top 10, not to get the sum total. Check out this video for my approach on obtaining the sum: czcams.com/video/Nye-cFQpJvA/video.html

  • @jorgelobo2642
    @jorgelobo2642 Před 4 lety

    How do you fix the total. The total doesn't sum only the top 10 values

    • @AnthonySmoak
      @AnthonySmoak  Před 4 lety +1

      True. The intent of the video was to identify and show how to populate the bar charts, not sum the table. Totaling in Power BI sometimes requires a separate technique. Id have to explore further but most likely a combination of HASONEFILTER and SUMX would be involved in the solution.

    • @jorgelobo2642
      @jorgelobo2642 Před 4 lety +1

      @@AnthonySmoak I'll give it a try. Thanks. I've been struggling with that for weeks

    • @Wtfigo
      @Wtfigo Před 4 lety

      @@jorgelobo2642, I'd be happy if you can share your solution for the Total, I'm trying to create a measure to compare various values to the top 1.
      thank you.

    • @jorgelobo2642
      @jorgelobo2642 Před 4 lety +1

      Maria Phetteplace
      Top 10 EADs (Visualizacao):=
      var eadRankVar = RANKX(ALL('DIM Cliente'[CIF]);CALCULATE(SUM('Fact'[EADBruto]);NOT(ISBLANK('Fact '[CIF])));;DESC;Dense)
      var rankingsEAD = IF(eadRankVar

    • @jorgelobo2642
      @jorgelobo2642 Před 4 lety

      Maria Phetteplace Top 10 EADs (Total):=
      CALCULATE(
      SUM('Fact'[EADBruto]);
      CALCULATETABLE(
      TOPN(
      10;
      GROUPBY('Fact';'Fact'[CIF]);
      CALCULATE(SUM('Fact'[EADBruto]))
      );NOT(ISBLANK('Fact'[CIF])))
      )