The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Folks,
Had a horizontal bar chart showing the SUM of transaction cost for each service.
I'd like to calculate the amount of the most expensive service (here it's "compute") in dax.
As MAX only refers to a column,
How can I do that ? I thank you in advance folks !
Solved! Go to Solution.
ok I found it : with top N function :
= SUMX( TOPN( 1, SUMMARIZE( InternetSales, InternetSales[ProductKey], "TotalSales", SUM(InternetSales[SalesAmount]) ), [TotalSales], DESC ), [TotalSales] )
Hi @Jay20024 please check this
Let me precise how my dataset works. Hope it will be clearer. I'd like to find 200 through a dax measure.
ok I found it : with top N function :
= SUMX( TOPN( 1, SUMMARIZE( InternetSales, InternetSales[ProductKey], "TotalSales", SUM(InternetSales[SalesAmount]) ), [TotalSales], DESC ), [TotalSales] )
Hi @Jay20024
Is this the result you want?
If this answers your questions, kindly accept it as a solution.
If this is helpful, then please give kudos.
You gave a good clue !
= SUMX( TOPN( 1, SUMMARIZE( InternetSales, InternetSales[ProductKey], "TotalSales", SUM(InternetSales[SalesAmount]) ), [TotalSales], DESC ), [TotalSales] )
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |