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
I have my measure where I am trying to display an average... The average should change by month and of course take into account BLANKS.
So, if I have data:
June: 3
July: 4
August: BLANK
I want to see (for the selected month):
June: 3
July: 3,5
August: 2,333
To achieve this I use CALCULATE ( [Users Avg Months] ,DATESYTD('Date'[Date] ,"31/05") )
It works fine with TOTALS!! ; but when I drag "user type" from Dimension it works wrong.
My code is:
Users:=CALCULATE(SUM(Users[Actual]), FILTER('User Type', ' User Type'[C Or A] IN {"A"} ))
Users Avg Months:= AVERAGEX ( VALUES('Date'[DW_SK_Date]),[Users] )
I get an error saying I cant use COALESCE. (The engine is SSAS 2019)
@Anonymous
Try
Users Avg Months :=
AVERAGEX ( VALUES ( 'Date'[DW_SK_Date] ), [Users] + 0 )
Hi @Anonymous
Please try
Users Avg Months :=
AVERAGEX ( VALUES ( 'Date'[DW_SK_Date] ), COALESCE ( [Users], 0 ) )
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 13 | |
| 10 | |
| 8 |