Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column, case type and two countries, Singapore and Malaysia.
I want to do a bar chart and have a count of case type for Singapore and Malaysia side by side.
The dimension is by months.
I'd like to use the if then else expression but I have no idea how to word it.
I want to do if country = singapore, then count (case type) if not, then do not count. How do I do that?
Try like:
Count({<Country={'Singapore'}>} [Case Type]) // Set analysis; performance wise better
Or,
Count(If(Country='Singapore', [Case Type]) ) // If ..then ..else
Try like:
Count({<Country={'Singapore'}>} [Case Type]) // Set analysis; performance wise better
Or,
Count(If(Country='Singapore', [Case Type]) ) // If ..then ..else
Below Expression provide you the count of CaseType where country=Singapore. Else it will not calculate.
=count({<Country={'Singapore'}>} CaseType)
Hi,
use set analysis Write two expression
like
count({<country={"Singapore"}>}case type)
and
count({<country={"Malaysia"}>}case type)
or if you want if else
then try like
count(if(country='Singapore',case type,if(country='Malaysia',case type)))
REgards
Hey Tresesco
how may I do the following expression in my chart?
- what I'm trying to do is - return only the results which are greater than or less than 3000 for example. for that i used
if(Sum({<Year=,Month]=, Date={'>=$(vYTDStart)<=$(vYTDEnd)'}>}Amount) >=3000 ,
Sum({<Year=,Month=, Date={'>=$(vYTDStart)<=$(vYTDEnd)'}>}Amount),'0') // this is returning one end of the result. but then if i go
if(Sum({<Year=,Month]=, Date={'>=$(vYTDStart)<=$(vYTDEnd)'}>}Amount) >=3000 ,
Sum({<Year=,Month=, Date={'>=$(vYTDStart)<=$(vYTDEnd)'}>}Amount),'0')
or
if(Sum({<Year=,Month]=, Date={'>=$(vYTDStart)<=$(vYTDEnd)'}>}Amount) <= - 3000 ,
Sum({<Year=,Month=, Date={'>=$(vYTDStart)<=$(vYTDEnd)'}>}Amount),'0') //this returns 0 or -1
if you could please point out what I'm doing that's incorrect.
Thanks.
Bon.