Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi friends!
I need to get the 3 highest values for each product sold considering the last 4 months (or 6) from the date on that I am (today for example) and calculate the average.
can anyone help me?
NewMeasure=AVERAGEX(TOPN(3,ALLSELECTED(dCalendar[YearMonth]),CALCULATE(SUM(FactTable[Amount]),KEEPFILTERS( DATESINPERIOD('Calendar'[Date],EOMONTH(TODAY(),0),-3,MONTH)))),CALCULATE(SUM(FactTable[Amount])))
hello @wdx223_Daniel
When your refer to "dCalendar[YearMonth]", you mean, in my case dCalendar[date] ( with day, month, year), or or do you want a table with year and month only?
tks your reply
best regards
User | Count |
---|---|
54 | |
23 | |
19 | |
18 | |
17 |
User | Count |
---|---|
91 | |
86 | |
46 | |
28 | |
22 |