The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Can you help me with measure which return maximum monthly sales value
Table Sales contains sales values for every day in 2022
Date | Sales | |
1/1/2022 |
| 2000 |
1/2/2022 | 3000 | |
1/3/2022 | 1000 | |
.... | ||
30/12/2022 | 5000 | |
31/12/2022 | 1000 |
and result will be month which have max (highest) sales in the month e.g.
Month | Sales | |
Jun2022 | 150000 |
Thank you
Solved! Go to Solution.
@Tricx , you can use TOPN
Maxx(TOPN(1, allselecetd(table[Month]), calculate(sum(Table[Sales])) , desc) , [Month])
Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ
@Tricx , you can use TOPN
Maxx(TOPN(1, allselecetd(table[Month]), calculate(sum(Table[Sales])) , desc) , [Month])
Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ