Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart with months as dimension: Current month's data the same as last's

Hi,

I have a chart:

Capture.PNG

It sums data by month.

I want the current month (12), instead of being the actual data, to be the same as the month before it (11).

How can it be done?

The attached qvw has the relevant chart.

Thanks!

1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Dear ,

Kindly find the attached workaround for your issue.

View solution in original post

7 Replies
mdmukramali
Specialist III
Specialist III

Dear ,

Kindly find the attached workaround for your issue.

Anonymous
Not applicable
Author

So you are after what is labelled Month 12 to show value for Month 11.

For what is labelled Month 11 do you wish to show Month 11 value or that of Month 10 ?

Not applicable
Author


Please find the attached Document

tresesco
MVP
MVP

Among many options, one:

If(Month=vMaxMonth, sum(total {<Month={"$(vPreMaxMonth)"}>}Data), sum(Data))

PFA

jyothish8807
Master II
Master II

Hi Tresesco

I did the same before, but in my case its giving 148 to all the months can you tell me why?

I used:

if(Month=max(Month), sum(Total{<Month={'$(=Max(Month)-1)'}>}Data), sum(Data))

In my case all the months are getting same value, how?

Regards

KC

Best Regards,
KC
tresesco
MVP
MVP

Because of 'Month=Max(Month)' section of the formula. While your dimension is Month, Max(Month) would be always the same month(that is there in the row) as in the rows. Hence, the Month=Max(Month) comes always true for all rows.

You could try:

if(Month=max(Total Month), sum(Total{<Month={'$(=Max(Month)-1)'}>}Data), sum(Data))

Hope that helps.

jyothish8807
Master II
Master II

Got it  , thanks a lot Tresesco

Regards

KC

Best Regards,
KC