Measure isn't averaging

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?

Hi,

Thanks for posting your query in the form .Can you also share the pbix with dummy data so form member can help you fast .

Thanks

My hunch is the measure: “[Total Regular&Premium Hours]” is no longer returning a blank.

1st: Are you sure the measure is returning blank?

2nd: Maybe change the calculate in your AVERAGEX function from
CALCULATE(IF([Total Regular&Premium Hours]= BLANK(),0, [Total Regular&Premium Hours])))
to
CALCULATE(IF(ISBLANK([Total Regular&Premium Hours]),0, [Total Regular&Premium Hours])))

Thanks

1 Like

Hi @Tye, did the response provided by @rktoff help solve your query. It’s been a while since we got a response from you. In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @Tye, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.