Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

-7 network days calculation syntax

Hi i am trying to set an expression to calculate the last seven working days.

I have one key figure - weeklyusage

the syntax i have is as follows, however is incorrect

=sum(networkdays(today()-7), weeklyusage)))

Your help is greatly appreciated.

Best,

Bradley

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try sum({$<MyDate={'>=$(firstworkday(today(),7))'}>} weeklyusage)


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

if the field related to time is myDate then

=sum({$ <myDate={'=$(networkdays(today()-7)'}>}), weeklyusage)))

hope it helps

thomas_skariah
Creator III
Creator III

Hi,

You can use below code.

sum({<date={">=$(=AddMonths(Max(date-6),0))<=$(=Max(date))"}>} Value).

Regards,

Tom

Not applicable
Author

Hi Alexandros!

thank you for your tip

unfortunately it is not working to calculate value is still 0.

however the syntax appears to be correct.

Gysbert_Wassenaar

Try sum({$<MyDate={'>=$(firstworkday(today(),7))'}>} weeklyusage)


talk is cheap, supply exceeds demand