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

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

exclude one day from the chart

Formula : 

=if(dayname(TransDate)>=today()-4,weekday(floor(TransDate)))

 

above formula show last 4 days in the chart  and work fine

need to exclude Friday  only from the last 4 days

please how to add : Weekday-={'Fri'} in if statement .   

Weekday already exist in calendar 

Regards ,

Labels (3)
5 Replies
Vegar
MVP
MVP

Try this

=if((dayname(TransDate)>=today()-4) and ([Weekday] <> 'Fri')),weekday(floor(TransDate)))

or try this

if(dayname(TransDate)>=today()-4,only({< Weekday-={'Fri'}>} weekday(floor(TransDate))))

 

wanass123
Contributor III
Contributor III
Author

thanks for your quick reply both code gives error : 

 

1st code : error in expression if takes 2-3 parameters 

2nd code : error  invalid dimension

Vegar
MVP
MVP

checked the phratheses, looks like i put in one to many. Try this.

=if((dayname(TransDate)>=today()-4) and ([Weekday] <> 'Fri'),weekday(floor(TransDate)))

wanass123
Contributor III
Contributor III
Author

I'm sorry but still same error  in the chart  : Invalid Dimension

Chanty4u
MVP
MVP

why cant you create this in the script and use that as your dimension?

if((dayname(TransDate)>=today()-4) and ([Weekday] <> 'Fri'),weekday(floor(TransDate)))   as Yourfield