Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
So im really having a hard time with making an average of the last 10 values excluding the blanks. the average must take into consideration that the blanks inbetween the values are inconsistent. I hope you get the picture. I used the command below but it only copied the values instead of averaging them:
Before, I used to edit the formula bar each week in Excel to update the values so it would only average the last 10 values like this:
If anyone could help out that would be great!
thank you
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like the attached file.
Last 10 CZV avg measure: =
VAR newtable =
TOPN (
10,
FILTER ( ALL ( Data ), NOT ISBLANK ( Data[CZV] ) ),
Data[Date], DESC
)
RETURN
IF (
SELECTEDVALUE ( Data[Date] ) >= MINX ( newtable, Data[Date] )
&& SELECTEDVALUE ( Data[Date] ) <= MAXX ( newtable, Data[Date] )
&& NOT ISBLANK ( [CZV total measure:] ),
AVERAGEX ( newtable, Data[CZV] )
)
Try replacing VALUES ( 'afvalwater CPL'[Datum] ) with ALLSELECTED ( 'afvalwater CPL'[Datum] )
This didnt work. gave me duplicate values instead. thank you tho!
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like the attached file.
Last 10 CZV avg measure: =
VAR newtable =
TOPN (
10,
FILTER ( ALL ( Data ), NOT ISBLANK ( Data[CZV] ) ),
Data[Date], DESC
)
RETURN
IF (
SELECTEDVALUE ( Data[Date] ) >= MINX ( newtable, Data[Date] )
&& SELECTEDVALUE ( Data[Date] ) <= MAXX ( newtable, Data[Date] )
&& NOT ISBLANK ( [CZV total measure:] ),
AVERAGEX ( newtable, Data[CZV] )
)
Thanks a bunch! this worked for me.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |