Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
This measure was created on a data model to show the average over time to include months an entry may not be made. This worked fine until an update was made to the model. The new model is built in a virtualization tool (online database) that integrates the tables into a model before it is published out to Power BI. With this format the date table in integrated into the model and does not show as a separate table. This measure no-longer works with the new model. It does not add a 0 to field that is blank. We are unable to figure out why.
Test Average Total Hours per YearMonth =
AVERAGEX(
KEEPFILTERS(VALUES(DimCalendar[FYMonth])),
CALCULATE(IF([Total Regular&Premium Hours]= BLANK(),0, [Total Regular&Premium Hours])))
This is what a visual should look like when it is properly averaging
What could be the cause of this?
Thanks guys. These options have been tried, but the measures still aren't adding a 0 to the Matrix. Power BI won't allow me to change FYMonth to a date. Even as a decimal the 0 isn't being added.
Hi, @tbrown33
Please try follow steps:
Add a new seperated table for DimCalendar[FYMonth] and establish a relationship between the new table and your original table.
New table =
DISTINCT ( DimCalendar[FYMonth] )
Then in the matrix visual, you need to replace your original field ‘DimCalendar[FYMonth]’ with the new field ‘NewTable[FYMonth]’. In this way, your original measure should work.
Best Regards,
Community Support Team _ Eason
Hi,
Try this
Measure = coalesce([Total Regular&Premium Hours],0)
Measure 2 = averagex(values(DimCalendar[FYMonth]),[measure])
@tbrown33 , I doubt you should use 0, assume this is a measure - [Total Regular&Premium Hours]
AVERAGEX(VALUES(DimCalendar[FYMonth]),[Total Regular&Premium Hours])
or
AVERAGEX(VALUES(DimCalendar[FYMonth]),[Total Regular&Premium Hours]+0)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |