Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
kdarnt
Frequent Visitor

Getting unexpected data from measure based on the date hierarchy level

Hi, I have a date hierarchy that is performing as expected for one measure, but giving some odd results for another measure. 

 

Here's my two charts, joined by date. 

pb - table relationship.png

 

This is what the date table looks like (apologies for not uploading actual data, it's HR data so sensitive)

pb - date table.png

 

Date hierarchy:

pb - hierarchy.png

 

Here are the two measures - I am having trouble with the chart displaying the second one, Monthly_turnover: 

pb - employee measure.pngpb - monthly turnover measure.png

 

**Here's the actual issue. When I chart the Reg_employees_month_beg using the custom date hierarchy, it works as expected (top chart). But the chart of the Monthly_turnover measure (which relies on the Reg_employees_month_beg) measure - it only works at the Month level of the hierarchy. When I add Year back in, now the turnover values are infinity. Since something divided by zero is infinity, that makes me think something is going wrong with the denominator of the Monthly_turnover measure, but it seems to be working from the first chart. (The Reg_employees_month_end measure is also working as expected.)

 

Chart with year and month in date hierarchy - and wrong values for Monthly_turnover:

pb - wrong chart.png

 

Chart showing expected values (ballpark) for Monthly_turnover, but I need to see it by year and month. 

pw - monthly chart.png

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Hi @kdarnt ,

 

[Monthly_turnover] measure is based on [Term],[Reg_employees_month_beg] and [Reg_employees_month_end]. According to your screenshoot, I think [Monthly_turnover] will return 0 or blank when [Reg_employees_month_beg] + [Reg_employees_month_end] = 0 or [Term] = 0. So please check [Term] and [Reg_employees_month_beg] + [Reg_employees_month_end] part to get more details.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
kdarnt
Frequent Visitor

Thanks, yeah I finally put it together that the values were being calculated as 0 and infinity, which was messing up the axis of the chart. 

kdarnt
Frequent Visitor

I should mention the Terms measure referenced in the turnover calculation also seems to be working fine in charts, with both the year and month parts of the date hierarchy. 

 

 

Hi @kdarnt ,

 

[Monthly_turnover] measure is based on [Term],[Reg_employees_month_beg] and [Reg_employees_month_end]. According to your screenshoot, I think [Monthly_turnover] will return 0 or blank when [Reg_employees_month_beg] + [Reg_employees_month_end] = 0 or [Term] = 0. So please check [Term] and [Reg_employees_month_beg] + [Reg_employees_month_end] part to get more details.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.