Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create reporting dates as variables in order to show data for the respective months?

Hi,

I have a got a series of data for 2 months. Presently in order to differentiate between the dates, I had used the following formulae:

SUM({<COB_DATE={"$(=DATE(max(COB_DATE),'DD/MM/YYYY'))"}>}[SUM(EPE_UNSCALED)])

SUM({<COB_DATE={"$(=DATE(min(COB_DATE),'DD/MM/YYYY'))"}>}[SUM(EPE_UNSCALED)])

The issue with the above is that if an item has only occurred in 1 month, it still shows up in both instances as the max and min are unable to spot the difference.

To deal with this I created two variables for the dates as follows:

vfirst     fieldvalue('COB_DATE',1)

vfirst1    fieldvalue('COB_DATE',2)

Having done the above, I am able to get the variables to give me the correct dates, but when I attempt to formulate it in the form of a sum or a count, I get no results. An example of the formula I am using is:

=IF(COB_DATE=vfirst,sum([SUM(EPE_UNSCALED)]))

In the above, [SUM(EPE_UNSCALED)] is a field name.

Any help on this issue will be much appreciated!

0 Replies