Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have two related questions. First, can someone help me write an expression that counts the number of instances of a row with a specific nominal value?
My data structure looks like this:
Criteria_trans | Risk_trans_bucket | Risk_trans |
FC | Med | -7 |
GMO | Low | 10 |
Logging | Low | 0 |
Def | High | -12 |
FC | Low | 3 |
GMO | Low | -5 |
Logging | Med | -6 |
Def | Med | -9 |
I would like to know the count of each of the 'Risk_trans_bucket' levels for all of my data. More specifically, I would like to create a KPI for Low, Med and High respectively. The solution for this example would be:
Low = 4
Med = 3
High = 1
The next question I might want to ask is, how many 'Low's are associated with 'FC' in the 'Criteria_Risk' column.
The count of 'Low's for the example would be:
FC = 1
1st Req
Create a chart with Risk_trans_bucket as dimension and Count(Criteria_trans) as expression.
2nd Req
Count({<Criteria_trans = {'FC'}, Risk_trans_bucket = {'Low'}>}Criteria_trans)
1st Req
Create a chart with Risk_trans_bucket as dimension and Count(Criteria_trans) as expression.
2nd Req
Count({<Criteria_trans = {'FC'}, Risk_trans_bucket = {'Low'}>}Criteria_trans)
For Req 1 I wanted to create 3 different KPIs so I converted your answer from Req 2 and used it to solve Req 1:
Count({<Risk_trans_bucket = {'Low'}>}Risk_trans_bucket)
Count({<Risk_trans_bucket = {'Med'}>}Risk_trans_bucket)
Count({<Risk_trans_bucket = {'High'}>}Risk_trans_bucket)
Thanks!
This is actually not working for me.. It is just giving me a total count of all the FC rows but not by Low/Med/High. Any ideas?
Would you be able to share a sample to show the issue?