Forum Discussion
sivarajan21
Post Prodigy
2 years agoDax measure doesn't return correct total value for selected slicer
Hi, Created a measure as below: & But the above measures doesn't return correct values and it is not matching my expected result. My expected result is: When I sele...
- 2 years ago
Hi sivarajan21
So on the utility you want their average, on the total you want to calculate the average for each utilities average?Invoice Unit Rate test Sam =If(HASONEVALUE(Points[Utility]),CALCULATE([Invoice Unit Rate test 2], all(Points), Points[Utility] = SELECTEDVALUE(Points[Utility])),AVERAGEX(DISTINCT(Points[Utility]), [Invoice Unit Rate test 2]))
SamWiseOwl
Super User
2 years agoHi sivarajan21
So on the utility you want their average, on the total you want to calculate the average for each utilities average?
Invoice Unit Rate test Sam =
If(
HASONEVALUE(Points[Utility])
,CALCULATE([Invoice Unit Rate test 2], all(Points), Points[Utility] = SELECTEDVALUE(Points[Utility]))
,AVERAGEX(DISTINCT(Points[Utility]), [Invoice Unit Rate test 2])
)
sivarajan21
Post Prodigy
2 years agoHi SamWiseOwl ,
This time we did it!
Thanks for your quick response & amazing solution!
This worked like a gem and i will mark it as solution!
I have given kudos as well!
Many Thanks