Forum Discussion
Total Incorrect for weighted calculation - DAX help
Hi alexei7
Create a measure
Measure = IF(ISINSCOPE(Sales[SalesDateMonth]),[Adjusted Sales],SUMX(ALLSELECTED(Sales),[Adjusted Sales]))
Maggie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Maggie,
Thanks very much for your help.
This does work in that specific visual, however I also want to use this metric in a matrix visual with the date.
Equally I noticed that the metric only worked when the slicer is being used, i want this to work all the time.
The below is the kind of chart where i want this metric to also work:
Let me know if you have any questions where I can clarify.
Thanks
Alex
- v-juanli-msft6 years agoCommunity Support
Hi alexei7
Do you want to column total of matrix to show correct?
If so, create a measure
Measure 2 = IF ( ISINSCOPE ( Sheet1[date] ), [Measure], SUMX ( FILTER ( ALLSELECTED ( Sheet1 ), Sheet1[country] = MAX ( Sheet1[country] ) ), [Measure] ) )Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- alexei76 years agoContinued Contributor
Hi Maggie,
Thanks for your time in looking into this.
I don't quite understand your solution, and it doesn't correlate to my example, so I can't translate it, or make it work.
e.g. my example has two connected tables
The pbix model with dummy data is attached here:
https://mega.nz/#!rwNBTSSY!cK0EAKschH1tAcXspNRdF4rwCY9YoOXebyREhmXVamI