Forum Discussion
Dax Measure using DATEDIFF
- 7 years ago
hi, Arnault_
For your case, it is just a measure totals problem. Very common.
It is recommended that you Learn more about the row context in DAX.
https://www.sqlbi.com/articles/row-context-and-filter-context-in-dax/
https://www.microsoftpressstore.com/articles/article.aspx?p=2449191
After that, you will understand it easily.
You could change your visual from clustered column chart to table visual
So 3 or -8 is the result for the calculation based on whole table.
and for your second question, it is the same issue.
You could just use this formula to create a measure
Measure = CALCULATE(COUNTAX('dataset',[On-time shipping (dev) "Average"]))or
Measure = CALCULATE(COUNTAX('dataset',[On-time shipping (dev) "Max"]))Result:
I have had the same problem as you, but now I understand it's very simple. please study these two post well:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Best Regards,
Lin
hi, Arnault_
For your case, it is just a measure totals problem. Very common.
It is recommended that you Learn more about the row context in DAX.
https://www.sqlbi.com/articles/row-context-and-filter-context-in-dax/
https://www.microsoftpressstore.com/articles/article.aspx?p=2449191
After that, you will understand it easily.
You could change your visual from clustered column chart to table visual
So 3 or -8 is the result for the calculation based on whole table.
and for your second question, it is the same issue.
You could just use this formula to create a measure
Measure = CALCULATE(COUNTAX('dataset',[On-time shipping (dev) "Average"]))
or
Measure = CALCULATE(COUNTAX('dataset',[On-time shipping (dev) "Max"]))
Result:
I have had the same problem as you, but now I understand it's very simple. please study these two post well:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Best Regards,
Lin
Hi v-lili6-msft,
I would like to thank you again for your guidance. This will help a lot. You're right, I definitelly need to learn more about DAX. I will take a look at the articles your shared with me. Thanks a lot
Best,