Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I would like to create a Top 5 and Bottom 5 ranking based off of a Measure that is interactive based off of the filter selections.
A picture is posted below(Dummy Data).. That I will further explain
So in the table I have a Market Column which is in my "Geography" Table and I have a category column which is in my "Retailer Table"... POS USD TY and POS USD LY are both measures (Foreign Currency/USD Conversion Rate) ... IYA is another measure that is taking POS USD TY / POS USD LY *100... I would like to have another column that ranks The Top 5 IYA's and Bottom 5 IYA's...
As I choose my time filter -- Last Week ,Last 4 Weeks, Last 52 Weeks I want the table and ranking systems to change based off selections. Currenlty I'm stuck and don't know what formula to use.. TOPN as a visual filter does not work .. I know I need a Rankx formula.. Please help!!!
I would like to create a Top 5 and Bottom 5 ranking based off of a Measure that is interactive based off of the filter selections.
A picture is posted below(Dummy Data).. That I will further explain
So in the table I have a Market Column which is in my "Geography" Table and I have a category column which is in my "Retailer Table"... POS USD TY and POS USD LY are both measures (Foreign Currency/USD Conversion Rate) ... IYA is another measure that is taking POS USD TY / POS USD LY *100... I would like to have another column that ranks The Top 5 IYA's and Bottom 5 IYA's...
As I choose my time filter -- Last Week ,Last 4 Weeks, Last 52 Weeks I want the table and ranking systems to change based off selections. Currently I'm stuck and don't know what formula to use.. TOPN as a visual filter does not work .. I know I need a Rankx formula.. Please help!!!
Hi,
Share the link from where i can download your PBI file.
Hi,
Upload the file to OneDrive/Google Drive and share the download link with me.
Hello,
@Ashish_Mathur could you please try this (https://drive.google.com/open?id=1Yqix6czPTLJ981_TRB8VmxnvZLi07ftW)... It has the file located within the drive... I've never used Google Drive so please let me know if this doesn't work... I appreciate your help!
I will send you a message further breaking down the file!
Thanks,
Garrrett
Your question is not clear. Please show the expected result here.
I would like to write a RANKX formula that ranks the TOP and BOTTOM 5 Country and Categories based off of IYA. So as different slicers are selected it will change the Top and Bottom 5.
For example "LA" is selected in the Region slicer then the TOP 5 will show the top 5 country/categories that have the top 5 IYA and bottom 5 IYA. As the timeframe slicer is changed as well the TOP and Bottom 5 can change as well. Example LW Canada ^&8 could be in the top 5 but L52W it may not be. Below is a picture of how I invision is roughly looking but only 5 rows.
I know it will be a RANKX formula and I can then use the TOPN function on the filters... Thank you for all the help and I look forward to hearing from you
Hi,
I cannot help you because there are no figures appearing in the IYA column in your visual. So even if i write a formula, i will not see any meaningful ranking result.
The way the formulas are set up is that some of the slicers need to be selected for the tables to display figures... Some categories may not have sales in certain markets so you will need to sort by IYA or POS to bring the numbers to the top of the table. Please let me know if you need anything else. I appreciate all of the help.
Hi,
I sorted but still did not see any numbers in the IYA column. It was entirely blank.
Just select a timeframe in the "perd_short_desc" slicer and it will populate the bottom tables... If I need to resend the file please let me know.
Hi,
Still no luck. I made a selection in the slicer but still did not see any numbers in the IYA column of the Table.
I will re-post the link to download the file but I downloaded it from the file from the original link and made a selection on the time frame slicer and it worked fine... If you could download the orignial file again and make a selection on this slicer
Once this selction is made it will populate the table in the bottom left... I've verified this several times...
Here is the new link: https://drive.google.com/file/d/1Yqix6czPTLJ981_TRB8VmxnvZLi07ftW/view
Hi,
This measure will rank all glb_category within a market
= RANKX(ALLSELECTED(POS[glb_category]),[IYA])
If you wish to rank the market, then remove the glb_category from the visual and write this measure
= RANKX(ALLSELECTED(geo[market]),[IYA])
You may now filter this measure by Top 5/Bottom 5.
Perhaps something along the lines of:
MyRankTop = RANKX(ALLSELECTED('Table'),[IYA],[IYA],DESC) MyRankBottom = RANKX(ALLSELECTED('Table'),[IYA],[IYA],ASC) IsTop5 = IF([MyRankTop]<=5,1,0) IsBottom5 = IF([MyRankBottom]<=2,1,0)
@Greg_Deckler Thank you for the reply... Unfortunately this didn't work... It produced multiple lines with the same ranking... I'm looking to have the highest IYA's be ranked the top and the lowest IYA's ranked on the bottom... Any other ideas ?
You'll need to probably play with the "ties" optional parameter of RANKX. An alternative might be to fiddle around with TOPN.
https://msdn.microsoft.com/en-us/query-bi/dax/rankx-function-dax
https://msdn.microsoft.com/en-us/query-bi/dax/topn-function-dax
I will look into this... Thank you for the tips... Anyone else that has recomendation I would be happy to hear them!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |