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.
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
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |