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: 
Not applicable

Pull data for the last 7 days in Dimension

Hello All,

I am trying to pull out only the last 7 days in a calculated dimension and it says the expression is OK but it does not give me any data.

Below is my calculated dimension:

=if(Date >= today()-7 and Date = today(), Date)

Date is my field name for date.

Thanks for your help.

Kind Regards,

Hasvine

10 Replies
aveeeeeee7en
Specialist III
Specialist III

Instead of using the Date Logic in Dimension use it in the Expression Level.

Like this:

Sum({<NewDate={'>=$(vStartDate)<=$(vEndDate)'}>} Value)

Where vStartDate and vEndDate are Variables

vStartDate=Date(Today()-7)

vEndDate=Date(Today())

Regards

Av7eN