Hi PowerBi Community!
I am having an issue with writing a DAX to create a column to rank the values of the overall sales table.
The dataset I have is the problem since it shows multiply entries of Sales for each company. (Each company has 5-10 Sales entries.)
The values in the above table are total yearly Sales and PowerBI has kindly categorized and sum them for each company.
I searched online and I found solutions that asked me to use Rankx but those works for tables with only singular entries. Is there any way in PowerBi to achieve the ranking for multiple entries?
Thank you so much! Any help or alternative solution to achieve similar results will be appreciated!
Go to Solution.
@lwklwk98 , is 2020 sales is column or 2020 is year as row
You need create a measure
sales = sum(Table[2020 sales])
Rank 2020 = rankx(all(Table[company]), [sales],,desc)
if sales is just a column same rank will work across year
For Rank Refer these linkshttps://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measureshttps://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
View solution in original post
Thanks so much! It worked like a charm 🙂
Learn how to create your own user groups today!
Click here to read more about the November 2021 Updates!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.