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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

userelationship error

EnvironmentSatisfaction =
    CALCULATE(
    MAX(FactPerformanceRating[EnvironmentSatisfaction]),
    USERELATIONSHIP(DimSatisfiedLevel[SatisfactionID],FactPerformanceRating[EnvironmentSatisfaction]))
Screenshot_1.pngScreenshot_2.png
This is an HR analytics project. I always get the same result as shown in the above chart (just constant line) when trying to visualize environment satisfaction or any other field with date from dates table.
I need help with this please!
5 REPLIES 5
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

According to your dax code , you use the DimSatisfiedLevel[SatisfactionID] to FactPerformanceRating[EnvironmentSatisfaction].

This means when you put the DimSatisfiedLevel[SatisfactionID] as a slicer , it will filter the FactPerformanceRating Table.

But in your visual , you use the Year as a dimension (like a slicer) and it returns the same value every year.

First , this dax adding here , it calcualtes the max of the FactPerformanceRating[EnvironmentSatisfaction] every year just related to the 'Table'[Year] and it will not be filtered by the DimSatisfiedLevel[SatisfactionID].

You need to check if current visual has some filter on this page or you put the right field as a dimension.You can also convert this visual to a table visual to see the actual value have got to explore this issue.

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

Anonymous
Not applicable

dataset

Datasets

Anonymous
Not applicable

It doesn't seem to be working. 

Kindly check this link, this is the project and tell me if there is any thing I could do about this error.

Thanks in advance

HR_ANALYTICS_PROJECT.pbix

Hi, @Anonymous 

Thanks for your quick response and you .pbix file .

I download it and see the dax now you used , i think this return the right.

You put the 'DimDate'[Year] on the visual  and use the MAX(FactPerformanceRating[JobSatisfaction]) to get the max of the JobSatisfaction per year.

And in your sample data , it seems to the max of the JobSatisfaction is the same in the each year . And it equals 5:(Such as : in 2013 year ,  the max of the JobSatisfaction =5 ;in 2014 year ,  the max of the JobSatisfaction =5)

vyueyunzhmsft_2-1677806725907.png

 

vyueyunzhmsft_0-1677806504247.png

Just in the other filter context , it will return the different value .

vyueyunzhmsft_1-1677806581618.png

So the value it returns is the right logic , you need to check what the really result you need . 

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

Anonymous
Not applicable

I got it. Thank you very much for your support!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors