Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count with conditional expression?

Hi, Experts, I having a problem on counting dimension with some conditional expression.

In the red box (A) below.

I need to count the the number of enterprise which meet the condition expression.

when condition vYearlyKPI >= ContractedSLA then only take count the enterprise.


vYealyKPI =       (((1+(floor(date(ContractDuration_Date_Max)) - floor(date(ContractDuration_Date_Min))))*24*60)

        - (Sum( If(Outage_Month = Outage_Month and Outage_Year=year(Today()) and [Enterprise Name]=[Enterprise Name], [Negotiated Outage Duration (minute)]))))

        /((1+(floor(date(ContractDuration_Date_Max)) - floor(date(ContractDuration_Date_Min))))*24*60)

Can anyone help on this. Thanks!

Capture.PNG

1 Solution

Accepted Solutions
agigliotti
MVP
MVP

you should aggregate your variable "vYearlyKPI" maybe with a Sum( ... ) as well as Sum( [Contracted Availability (%)]/100 ).

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

4 Replies
agigliotti
MVP
MVP

maybe this:

Sum( Aggr( if( $(vYearlyKPI) > ContractedSLA, 1, 0 ), Enterprise ) )

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Anonymous
Not applicable
Author

Hi, thanks, but this expression doesn't give the result I expect. The result should be "3" in this case.

Capture.PNG

agigliotti
MVP
MVP

you should aggregate your variable "vYearlyKPI" maybe with a Sum( ... ) as well as Sum( [Contracted Availability (%)]/100 ).

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Anonymous
Not applicable
Author

Thanks I found the solution