Forum Discussion
Matrix Totals
I know this has been covered a few times, I'm just not understanding how I can use the
"HASONEFILTER" function with a measure. All the examples I have seen are looking at a column, or maybe the way I'm approaching this is wrong.
my issue is I have a measure in a matrix that is correct except for the total.
I've been trying to use an equation that looks like-
=IF(HASONEFILTER('Table'[Year]),
[Measure 3] or deconstructed measure IF ([Measure 1] = 0,(1*[Measure 2]) , ([Measure 2] * [Measure 1])
I can get this far and have the equation do what I want, all the rows are correct. my issue is when it comes to calling out what will be the total in the Matrix. I cannot use a SUM or SUMX function, CALCULATE gets me back to where I was.
Let me know if I'm missing something, or need more info,
Thank you
Rlucero2 I think you want:
Ult Claims LDF Method 3 =var vTable = SUMMARIZE('Raw Data','Raw Data'[*Coverage Year],"__Value",[Ult Claims LDF Method])RETURNIF(HASONEVALUE('Raw Data'[*Coverage Year]),[Ult Claims LDF Method],SUMX(vTable,[__Value]))
5 Replies
- Greg_DecklerCommunity Champion
Rlucero2 This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, 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- Rlucero2Frequent Visitor
Not quite, though I am closer, I'm going to try and look at the More complex example you gave. This is what I had.
Ult Claims LDF Method 3 =var vTable = SUMMARIZE('Raw Data','Raw Data'[*Coverage Year],"__Value",[Ult Claims LDF Method])RETURNIF(HASONEVALUE('Raw Data'[*Coverage Year]),[Ult Claims LDF Method],SUMX('Raw Data',[Ult Claims LDF Method]))- Greg_DecklerCommunity Champion
Rlucero2 I think you want:
Ult Claims LDF Method 3 =var vTable = SUMMARIZE('Raw Data','Raw Data'[*Coverage Year],"__Value",[Ult Claims LDF Method])RETURNIF(HASONEVALUE('Raw Data'[*Coverage Year]),[Ult Claims LDF Method],SUMX(vTable,[__Value]))