Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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