Forum Discussion
If statement based on measure
Hi,
I have created a matrix based on a calculated column in my data, I now need to create an 'if' statement based on the results in my matrix.
My matrix is as follows:
For each client I need to divide the results by the column - "count All 10". If the results are >=0.9 then enter "ok" otherwise enter "not". I think this is a simple solution however not sure how to work it to include it as a measure.
For example:
if 86/109 = 0.81 enter "not"
if 20/20 = 1 enter "ok"
Hi pardeepd84 ,
Considering [Client OK] and [Count All 10] are existing measure calculations as you haven't given information about them in the query.
You can write a following measure as follows:
CalcMeasure =
Var div = [Client OK] / [Count All 10]
RETURN
IF(div >= 0.9, "ok", "not")Thanks,
Pragati
1 Reply
- Pragati11
Super User
Hi pardeepd84 ,
Considering [Client OK] and [Count All 10] are existing measure calculations as you haven't given information about them in the query.
You can write a following measure as follows:
CalcMeasure =
Var div = [Client OK] / [Count All 10]
RETURN
IF(div >= 0.9, "ok", "not")Thanks,
Pragati