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.
Hello,
In my report I created a measure to calculate the average of the 2 best weeks of purchase in the last few years, which it works.
Opt =
var wt = year(today())*100+weeknum(TODAY(),1)
return if (SELECTEDVALUE(DimDate[Year/week])<wt,BLANK(),
var w= SELECTEDVALUE(DimDate[#Week])
var a= SUMMARIZE(FILTER(ALL(DimDate),DimDate[#Week]=w),DimDate[Date].[Année],"Purch",[Purchase])
var b = topn(2,a,[Purch],DESC)
return AVERAGEX(b,[Purch]))
Now I need a measure to sum these average like this.
How can I acheive this?
Thank you
PBIX file:
https://www.dropbox.com/s/6p0a7wgs23uwq3z/Test_purchase.pbix?dl=0
Hello, thanks for the reply.
I can't create a calculated table to achieve this because I have to many thing that can filter the result. I'm still searching for a calculated measure.
Thank you
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |