Forum Discussion
mihaita_baro
3 years agoHelper II
Calculated KPI based on two other columns
Hi guys, I have a small issue with my KPI6 calculation formula, i don't seems to find a calculation for my KPI6 Clients must have at least 2 reviews meeting the following criteria: - Session...
- Anonymous3 years ago
Hi mihaita_baro ,
Please try below steps:
1. below is my test table
Table:
2. add a new column with below dax formula
Column = VAR cur_clientID = 'Table'[Client ID] VAR tmp = FILTER ( ALL ( 'Table' ), 'Table'[Client ID] = cur_clientID ) VAR _a = SUMX ( tmp, [KPI6 Initial Review] + [KPI6 Last Review] ) RETURN IF ( _a = 2 && 'Table'[KPI6 Initial Review] = BLANK () && 'Table'[KPI6 Last Review] = 1, 1, BLANK () )Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
claymcooper
3 years agoResolver II
Try this: Calculate(Count(clientid),KPI6=1)
mihaita_baro
3 years agoHelper II
Hi claymcooper
That column is the desired output i wanna calculate.
It can be either a calculated column or a measure that count how many clients have KPI6 Initial Review =1 and KPI6 Last review =1
This is what i came up with but doesn't calculate properly
KPI6 FTB =
CALCULATE(DISTINCTCOUNT(Appointment_FTB[clientId]),
KEEPFILTERS(
FILTER(ALL(Appointment_FTB[KPI6 Initial Review],Appointment_FTB[KPI6 Last Review]),
Appointment_FTB[KPI6 Initial Review]=1 || Appointment_FTB[KPI6 Last Review]=1
)
)
)