Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
danm84306
New Contributor III

Sum of Value for Date - 30

Hello,

      I am looking for some Set Analysis help. I need to sum Dimension A only for dates that are the Max Date of Value B - 30 days. Nothing I am finding helps, any ideas?

something like

Sum({<Max(Date_B)-30>} Value_A)

10 Replies

Re: Sum of Value for Date - 30

May be this?

Sum({<Date_B = {"$(=Date(Max(Date_B-30),'DD-MM-YYYY'))>} Value_A)


Or

Sum({<Date_B = {">=$(=Date(Max(Date_B-30),'DD-MM-YYYY'))<=$(=Date(Max(Date_B),'DD-MM-YYYY'))>} Value_A)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
danm84306
New Contributor III

Re: Sum of Value for Date - 30

Neither works. returns "Error in expression"

danm84306
New Contributor III

Re: Sum of Value for Date - 30

Error was due to missing " but this still does not solve it question. both expressions do not work.

Re: Sum of Value for Date - 30

Do you want to sum Value_A where the Date_B >= Max(Date_B) - 30? or just Date_B = Max(Date_B) - 30?

Re: Sum of Value for Date - 30

Also, what is the format for Date_B field?

danm84306
New Contributor III

Re: Sum of Value for Date - 30

MM/DD/YYYY

danm84306
New Contributor III

Re: Sum of Value for Date - 30

Sum Value B for all days that equal Max(Date) - 30

Highlighted

Re: Sum of Value for Date - 30

Try this

Sum({<Date_B = {"$(=Date(Max(Date_B)-30, 'MM/DD/YYYY'))"}>} Value_A)

danm84306
New Contributor III

Re: Sum of Value for Date - 30

This worked, thank you!!