Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a data set like below.
I would like to count the number of times that RED appears and use that as the expression on a Guage chart.
Can any one help?
Task ID | RAG Status |
---|---|
1 | RED |
2 | GREEN |
3 | GREEN |
Hi,
if([Status]='Open', Count({<[RAG Status] = {"RED"}>}[RAG Status]), null())
or
if([Status]='Open', Count({<[Status]={'Open'},[RAG Status] = {"RED"}>}[RAG Status]), null())
Will works Fine.In Your Table you should Suppress Null values at Presentation and Dimensions tab as well.
If your dimension is status means there you can see only Open as a field.
HTH,
Hirish
Try this:
To count Red
=SubStringCount(Concat([RAG Status], '|'), 'RED')
To count Green
=SubStringCount(Concat([RAG Status], '|'), 'Green')
or
=Count({<[RAG Status] = {'RED'}>}[RAG Status])
=Count({<[RAG Status] = {'GREEN'}>}[RAG Status])
Hi There,
This doesn't seem to have worked unfortunately, the count is showing as the total number of rows in the table, rather than the number of instances where the value is RED
Count({<[RAG Status] = {"RED"}>}[Rag Status])
Thanks
I guess would you be able to share a application where it isn't working?
Hi ,
Change your Expression like this,
May be its ,
Count({<[Rag Status] = {"RED"}>}[Rag Status])
OR
Count({<[RAG Status] = {"RED"}>}[RAG Status])
Can you help me a little bit here too:
So I've just added an if condition.
I want to count the number of RAG status where the status is open.
This doesn't seem to work - to confirm, the count now does work. Just need the if to work around it.
if([Status]='Open', Count({<[RAG Status] = {"RED"}>}[RAG Status]), null())
Hi,
if([Status]='Open', Count({<[RAG Status] = {"RED"}>}[RAG Status]), null())
or
if([Status]='Open', Count({<[Status]={'Open'},[RAG Status] = {"RED"}>}[RAG Status]), null())
Will works Fine.In Your Table you should Suppress Null values at Presentation and Dimensions tab as well.
If your dimension is status means there you can see only Open as a field.
HTH,
Hirish