Forum Discussion
Incorrect measure total in Matrix
Hi Experts,
Greg_Deckler
I have tried using summarize, sumx and hasonevalue function still giving incorrect result in total. I have used 3 different measure which I have written below
Datediff =
Measure 2
Measure 3
Final=
Var A= 300000/Last day of the month
Var B= A*( Datediff)
Var C =A*B
Var D= C*(%sum)
return D
I want to show Final measure in matrix visual agianst month, week and category dimension. Row wise data is showing correctly but at total showing incorrect data.
I
I want answer to be 2032819+544684=2577503 for D
Any help would be appreciated.
Thank you in advance.
Uzi2019 , Try to use something like below:
IF(HASONEFILTER('Table'[Month]),C*(%Sum),SUMX(VALUES('Table'[Month]),C*(%Sum)))Hopefully it may help you out.
8 Replies
- Greg_Deckler
Community Champion
Uzi2019 So, based on Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907, you are really going to need something like MM3TR&R. Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI CommunityAssuming that you have a measure that is working at the month and week levels, I imagine it would be something like:
Measure Total = VAR __CurrentCount = COUNTROWS('Table') VAR __AllCount = COUNTROWS(ALLSELECTED('Table')) VAR __Total = SUMX('Table',[Month],"__Measure",[This is your existing measure]) RETURN IF(__CurrentCount = __AllCount,__Total,[This is your existing measure])