Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |