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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression conditional

Hello,

I have the expression sum(sales).

i want to add the following formula if(variable=1,sum(sales)), however with this formula it only applies for the month that variable =1. i would like the expression to calculate the sales for all months if for one month the variable =1.

Thank you

24 Replies
sunny_talwar

vinieme12‌ variable is just a field, it is not a QlikView variable

Anonymous
Not applicable
Author

what i would like is to have for example a listbox that if for a chosen month, the registraion or drop value = 1 then to show the sum of sales for all months

sunny_talwar

Check this out:

If(Max(TOTAL Registration) = 1, Sum({<Date>}Sales), Sum(Sales))

Anonymous
Not applicable
Author

Hi,

Check if this works as per your requirement:-

If(Max(TOTAL <Month> variable) = 1, Sum({<variable=>} Sales))

Anonymous
Not applicable
Author

what i would like is to have for example a listbox that if for a chosen month, the registraion or drop value = 1 then to show the sum of sales for all months. you have above a sample of my data

vinieme12
Champion III
Champion III

This

If((sum(TOTAL <Date> Drop)+sum(TOTAL <Date> Registration)) > 0, Sum(Total <Date> Sales) , sum(Sales))

242561.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

not really what i was looking

sunny_talwar

Did you get to check my response above?

Re: Expression conditional

vinieme12
Champion III
Champion III

can you post a table showing expected o/p

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Yes,

I did check it, what i want is for example on january16, there is a registration of a client so i would like to see if a check in january16, to see all the sales of the client that was registered on january 16