Forum Discussion
NMOORE
Helper II
2 years agoincorrect Total Selected Value alternative
Hi, I need to sum quanities differently depending on my column values. The working example is much more complex with info I cannot share so I have drafted up a basic example using the Table below. ...
- 2 years ago
Hi,
so, leave your first calculation like thisExample = VAR _A =CALCULATE(SUM('Example Table'[Quantity]),FILTER(ALL('Example Table'),'Example Table'[Type] = "Cow"))VAR _B =SUM('Example Table'[Quantity])
RETURNIF(SELECTEDVALUE('Example Table'[Type]) = "Dog" ||SELECTEDVALUE('Example Table'[Type]) = "Donkey",_B / _A,0)Add one more measure:
Example2 =
SUMX(SUMMARIZE('Example Table', 'Example Table'[Type], "Example Correct", 'Example Table'[Example]), [Example Correct])
olgad
Resident Rockstar
2 years agolately i had to correct totals a lot, just doest work out within a variable (that was my intention too to just have it in one place), alas, you have to create a second measure.
NMOORE
Helper II
2 years agoHi Olgad,
Hope you're well.
I wondered if you knew what might be going wrong in a new scenario I have. Have you ever had only the grand totals wrong? I'm using HASONEVALUE to flick between different summarizes and everything is great accept the grand total (see pic). I'm aware this is limited info as I cannot share anything but thought it might be something you're used to seeing. I'm summarizing here against the periods/dates on the left...The grand total in the corner is off by circa £3m...
Thanks for any tips