Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshmanvepuri
Creator
Creator

Variable declaration

Hi,

How to get the last 7 days in the reporting layer and Sum of the quantity.

Created variable : vLast7DaysFlag 

Def: If(REP_DATE >= Date(Floor(Now()) - 14) AND REP_DATE <= Date(Floor(Now()) - 1), 1, 0)

Used in the Reporting as:

=Sum('$(=vLast7DaysFlag)'> QTY)



Still I am not get the data in the table.


Please advice on this..


Thanks a lot.


regards

LK Vepuri

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi Lakshman,

Check this link for set analysis expressions for various time periods

For last 7 days

Last 10 Days Sales

Sum({<Year=, Quarter=, Month=, Week=, REP_DATE ={‘>=$(=Date(Today()-7))<=$(=Date(Today()-1))’}>} QTY)

Hope this helps you.

Regards,

jagan.

View solution in original post

4 Replies
vikasmahajan

=Sum( {<($vLast7DaysFlag)>} QTY)


Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

May be try this:

=Sum({<REP_DATE = {"$(='>=' & Date(Today() - 14, 'YourDateFormat') & '<=' & Date(Today() - 1, 'YourDateFormat'))"}>} QTY)

sasiparupudi1
Master III
Master III

Try

=Sum({<REP_DATE = {">=$(=max(REP_DATE)-14) <=$(=max(REP_DATE))"}>} QTY)

jagan
Luminary Alumni
Luminary Alumni

Hi Lakshman,

Check this link for set analysis expressions for various time periods

For last 7 days

Last 10 Days Sales

Sum({<Year=, Quarter=, Month=, Week=, REP_DATE ={‘>=$(=Date(Today()-7))<=$(=Date(Today()-1))’}>} QTY)

Hope this helps you.

Regards,

jagan.