Forum Discussion
Greg_Deckler
Community Champion
10 years agoDealing with Measure Totals
This one has come up quite a bit recently. The issue surrounds using Measures in Table visualizations with a Total row. The complaint is that the "Total" row is "wrong" for the measure. Technically, ...
Anonymous
4 years agoNot applicable
Hi everyone,
I'm also having a problem with column totals with the following measure:
Zusatzumsatz =
VAR Zielgruppe =
CALCULATE(
[Umsatz pro Käufer],
FILTER('Table1', 'Table1'[CONTROLGROUP] = "Zielgruppe")
)
VAR Datum =
MAX(Table1[SENDDATE])
VAR ProgrammID =
MIN(Table1[Program ID])
VAR Kontrollgruppe =
CALCULATE(
[Umsatz pro Käufer],
Table2[PROGRAMID] = ProgrammID,
Table1[SENDDATE] = Datum,
Table1[CONTROLGROUP] = "Kontrollgruppe",
ALL()
)
VAR IstZielgruppe =
MAX(Table1[CONTROLGROUP])="Zielgruppe"
VAR Auflage_Final =
CALCULATE( SUM(Table1[AUFLAGE]), KEEPFILTERS(Table1[CONTROLGROUP]="Zielgruppe"))
RETURN
IF(IstZielgruppe,
(Zielgruppe - Kontrollgruppe)* Auflage_Final
)
As you can see - the column total is wring. I understand that the measure is calculating in row and not column context. Is there a way that the calculation in the value part of the table is evaluated per row but the total is just the sum of the column?
- Ashish_Mathur4 years ago
Super User
Hi,
Drag this measure to your visual
Measure = SUMX(VALUES(Data[kampagnenname]),[Zusatzumsatz])
Hope this helps.