Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

mikegauntlett
New Contributor

Sum(if(

Hi Guys,

I have

SUM(IF((IF(IsNull(AARO_Booking_Period) and IsNull(Status),'R0',If (IsNull(Status),'R1',Status)))='R0',1,0))

which sums the total for a set tollgate in this case R0 as underlined.

the R tollgate will either come from the IF statement:

IF(IsNull(AARO_Booking_Period) and IsNull(Status),'R0',If (IsNull(Status),'R1',Status))

or from the Status field itself.

This works for R0 and R1 when I change the underlined but not for any other.

I have tried sum(IF(Status='R2' etc. but this also does not work any Ideas?

As always greatly appreciated.

Tags (2)
4 Replies

Re: Sum(if(

You want to count when Status is R2? May be this

Count({<Status = {'R2'}>}Status)

mikegauntlett
New Contributor

Re: Sum(if(

Hi Sunny,

Afraid Not,

so for the 4 possible outcomes R0, R1, R2, R3.

The R0 & R1 will solely come from the IF statement:IF(IsNull(AARO_Booking_Period) and IsNull(Status),'R0',If (IsNull(Status),'R1',Status))


whereas the R2 & R3 will come from the status field which comes from an attached file.


I use the above IF as a master measure 'Master status'

vkish16161
Contributor III

Re: Sum(if(

You can probably look at using the Aggr function

Sum(Aggr(if(condition_true,1,0) , Dimension))

mikegauntlett
New Contributor

Re: Sum(if(

Afraid not @Vishnu_Chakravaram

Community Browser