Forum Discussion
Grand Total returning 0
- 2 years ago
Hi jasemilly ,
The reason your previous measure was blank in the total row is because the SELECTEDVALUE function used by the _mins variable returned null on the total row. A blank value multiplied by any number always is blank, and therefore causes the final result to be blank.
I've improved the expression for the measure for you, you can try it.
Reimbursement = SUMX ( SUMMARIZE ( Journeys, Journeys[Key], Journeys[Bill], Journeys[Arrival Minutes Late] ), VAR _mins = Journeys[Arrival Minutes Late] VAR _perc = SWITCH ( TRUE (), _mins >= 21, 1, _mins >= 16, 0.8, _mins >= 11, 0.6, _mins >= 6, 0.4, _mins >= 1, 0.2 ) RETURN Journeys[Bill] * _perc )Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi jasemilly ,
The reason your previous measure was blank in the total row is because the SELECTEDVALUE function used by the _mins variable returned null on the total row. A blank value multiplied by any number always is blank, and therefore causes the final result to be blank.
I've improved the expression for the measure for you, you can try it.
Reimbursement =
SUMX (
SUMMARIZE (
Journeys,
Journeys[Key],
Journeys[Bill],
Journeys[Arrival Minutes Late]
),
VAR _mins = Journeys[Arrival Minutes Late]
VAR _perc =
SWITCH (
TRUE (),
_mins >= 21, 1,
_mins >= 16, 0.8,
_mins >= 11, 0.6,
_mins >= 6, 0.4,
_mins >= 1, 0.2
)
RETURN
Journeys[Bill] * _perc
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~