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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
tom2qlik
Creator
Creator

Expresion If Flag + condition then result.

Hello,

I've created an expression to show the total % only for rows which are flagged as between 0-7 days
and where the total % is less than 0.3.  Below is the formular which I have put together however it returns blank where
it should be returning the Total %.

IF(MAX({<[0-7DayFlag]={"True"}>}[Total%])<'0.3', MAX({<[0-7DayFlag]={"True"}>}Total%])

Could someone point out what is the issue with the expression?

Thanks in advanced.

Tom

2 Replies
sunny_talwar

May be try this:

If(Max({<[0-7DayFlag] = {'True'}>} [Total%]) < 0.3, Max({<[0-7DayFlag] = {'True'}>} [Total%])

If that doesn't help, would you be able to provide a sample to take a look at?

tom2qlik
Creator
Creator
Author

Thanks for the response,

I actually moved away from this formula due to not receiving the correct outcome.

I am now using the following:

if(Aggr(

Sum({<[0-7DayFlag]={"True"}>}[Total1]+[Total2]+[Total3]+[Total4]) /

Sum(Products), Store, Area)<'0.3',

Aggr(

Sum({<[0-7DayFlag]={"True"}>}[Total1]+[Total2]+[Total3]+[Total4]) /

Sum(Products), Store, Area))

This is showing me the results for all 0-7 day rows where as I only want to see the rows where the outcome of the calculation is less than < 0.3.

I don't know why but it seems that the <'0.3' is being ignored in the if statement.