Forum Discussion
Help with DAX Measure
- 2 years ago
As far as I can see the issue here is your measure works in the body of the table because there is the context of job name / IDs that allow the userrelationship context to work.
The total row and the bar graph lack that context so the measure is returning the "wrong" value.
My suggestion would be to create a calculated column in either of your tables that returns the date difference for each row context. - Anonymous2 years ago
thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below
I am glad to help you.According to your description you are using the created measure in table and it is displaying fine, but not in card!
This is a very common problem, because it has to do with the computational environment in which the measure is placed (when you put the measure directly into the card, it actually shows the value of the total)
like this:
When you use a measure or calculate column, the card will always show the total value.
(power bi will show the aggregated value)
Here are my suggestions
1. add a slicer (the external filter way)
2. Add filters to the dax code (add internal filters)measure is affected by filters in the current visual and filters in the dax code as well as external filters (slicers)
while calculate column is affected by the row context (current row)
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
As far as I can see the issue here is your measure works in the body of the table because there is the context of job name / IDs that allow the userrelationship context to work.
The total row and the bar graph lack that context so the measure is returning the "wrong" value.
My suggestion would be to create a calculated column in either of your tables that returns the date difference for each row context.