Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
selvakumara
Creator
Creator

Add two conditions

Hi ,

This is my expression.

Count(if(ACTIVE='YES',customers))

But I want to add [type]={'PAF'} add count . How can i do it ?

Count(if(ACTIVE='YES',Count({$<[type]={'PAF'}>} [customers])))  this one throwing error.

Thanks in advance    

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

Count({$<[type]={'PAF'},ACTIVE={'YES'}>} [customers])


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
selvakumara
Creator
Creator
Author

tried but it doesn't give the exact count what i'm looking .

Thanks for your response

Thanks,

Selva

undergrinder
Specialist II
Specialist II

Hi Selva,

With if try this:

=Count(if(ACTIVE='YES' and type= 'PAF',customers,null())


With set analysis is the answer, that kaushik.solanki‌ wrote. That expression should return the same with count+if.


G.



selvakumara
Creator
Creator
Author

Hi Gabor Tarnoczai,

Thanks for your response.

Count(if(ACTIVE='YES',customers)) this gives me -- 150   in the filter I've selected type (PAF). 


If I  use your expression


Count(if(ACTIVE='YES' and type= 'PAF',customers,null())  -- it gives more than 150 not even close


Thanks,

Selva




undergrinder
Specialist II
Specialist II

It is strange.

What do you get, when the measure is =count(customer) and apply the two selections with filter pane?

The expressions and the filtered result should be the same.

G.

selvakumara
Creator
Creator
Author

Working Thanks for your help

undergrinder
Specialist II
Specialist II

I hoped so