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.
Hi @Anonymous,
You can use below calculate column who ranking by two columns and mark flag based on ranking amount.
Category = VAR _rank = COUNTROWS ( FILTER ( Sheet1, ISONORAFTER ( Sheet1[Revenue], EARLIER ( Sheet1[Revenue] ), ASC, Sheet1[Sales Volume], EARLIER ( Sheet1[Sales Volume] ), ASC ) ) ) RETURN IF ( _rank <= 5, "Top 5", IF ( _rank >= MAXX ( Sheet1, [SN] ) - 5, "Bottom 5", "Normal" ) )
Regards,
Xiaoxin Sheng
Hi Shiwen,
Can you please elaborate what do you mean by Top 5 and Bottom 5??
In general, this can be handled using a DAX query or M language which unions Top 5 and Bottom 5 attributes/measures.
Regards,
Hari T
Hi Hari,
I need to show the top-5 product by sales revenue and bottom-5 product by sales volume using a scatter chart with x-axis showing sales volume and y-axis showing revenue. I tried using the top-n filter but only 1 filter can be used. How will I be able to achieve this with DAX query or M language?
Thanks
HI @Anonymous,
Please provide a pbix file with sample data and expected result to help clarify your requirement and test to coding formula.
Regards,
Xiaoxin Sheng
Hi Xiaoxin Sheng,
Please download this link for the sample data as well as the expected output.
https://www.dropbox.com/s/9zl9eaozer0pyq0/Sample%20data.xlsx?dl=0
The chart should display the products color only green and red.
Need some help from you guys on how to show the data correctly.
Hi @Anonymous,
You can use below calculate column who ranking by two columns and mark flag based on ranking amount.
Category = VAR _rank = COUNTROWS ( FILTER ( Sheet1, ISONORAFTER ( Sheet1[Revenue], EARLIER ( Sheet1[Revenue] ), ASC, Sheet1[Sales Volume], EARLIER ( Sheet1[Sales Volume] ), ASC ) ) ) RETURN IF ( _rank <= 5, "Top 5", IF ( _rank >= MAXX ( Sheet1, [SN] ) - 5, "Bottom 5", "Normal" ) )
Regards,
Xiaoxin Sheng
Sheing - I would be interested to know what represents 'SN' in the table?
Can you please share the sample data used in this example. I'm not able to undestand the column [SN]
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |