Top and Bottom 10 Products by Sales Using RANKX in Power BI
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!
Nice explanation.Awesome
it was highly informative....good work !!!!
it would be a great help if i get the link for dataset and pbix file
Thank u'
very helpful video, thanks!!
Thank you!
The sum om the table does not work though.
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.
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
How do you fix the total. The total doesn't sum only the top 10 values
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.
@@AnthonySmoak I'll give it a try. Thanks. I've been struggling with that for weeks
@@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.
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
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])))
)