Forum Discussion
DAX Calculated column if statement (KPI Indicator)
- 5 years ago
datanau001
Because you added a calculated column, the result is evaluated on each row, to solve it, create a measure as follows and it instead of the column:KPI Indicator Measure= IF ( SUM ( 'V_SR_STATUS_LINES_SEC'[Total Audit Time Hrs] ) < SUM ( 'V_SR_STATUS_LINES_SEC'[SPE KPI] ), "KPI Met", "KPI Not Met" ) - 5 years ago
Hello, here is a way we can make it works with a calculated column:
KPI Indicator =
CALCULATE (
SUM ( 'V_SR_STATUS_LINES_SEC'[Total Audit Time Hrs] ),
FILTER (
ALLSELECTED ( 'V_SR_STATUS_LINES_SEC' ),
'V_SR_STATUS_LINES_SEC'[SR] = MAX ( 'V_SR_STATUS_LINES_SEC'[SR] )
)
)
datanau001
Because you added a calculated column, the result is evaluated on each row, to solve it, create a measure as follows and it instead of the column:
KPI Indicator Measure=
IF (
SUM ( 'V_SR_STATUS_LINES_SEC'[Total Audit Time Hrs] ) < SUM ( 'V_SR_STATUS_LINES_SEC'[SPE KPI] ),
"KPI Met",
"KPI Not Met"
)
- datanau0015 years agoHelper III
Fowmy Thank you for your reply.
Now with the measure, it worked fine.
However, I'll need this indicator as a column because it will be used to calculate how many tickets were solved as Kpi met and Kpi not met.
Thank you!
- datanau0015 years agoHelper III
Hello, here is a way we can make it works with a calculated column:
KPI Indicator =
CALCULATE (
SUM ( 'V_SR_STATUS_LINES_SEC'[Total Audit Time Hrs] ),
FILTER (
ALLSELECTED ( 'V_SR_STATUS_LINES_SEC' ),
'V_SR_STATUS_LINES_SEC'[SR] = MAX ( 'V_SR_STATUS_LINES_SEC'[SR] )
)
)