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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If condition in Set analysis

Hi Experts,

As I trying the yesterday sales in a text box, so, I tried like Sum({<DATE1= {'$(=Date(today()-1))'}>} [Sales]), which is working fine.

But I have no transaction of sales on Saturday and Sunday, the same expression shows zero as there is no transactions, so I tried

=If(Today()='Mon',Num(Sum({<DATE1= {'$(=Date(today()-3))'}>} [Sales]),'# ##0'), Num(Sum({<DATE1= {'$(=Date(today()-1))'}>} [Sales]),'# ##0')), but the expression shows no results.

Could you please suggest where I went wrong.

Regards

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

if(Weekday(Today())='Mon'

View solution in original post

4 Replies
Not applicable
Author

if(Weekday(Today())='Mon'

lironbaram
Partner - Master III
Partner - Master III

you need to change it to

=If(weekday(Today())=6,Num(Sum({<DATE1= {'$(=Date(today()-3))'}>} [Sales]),'# ##0'), Num(Sum({<DATE1= {'$(=Date(today()-1))'}>} [Sales]),'# ##0'))

sujeetsingh
Master III
Master III

You can use If only to handle all no need to set analysis

Not applicable
Author

Thanks Experts it works ...!