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

Measure calculated as a progressive

Hi,

I need to calculate a measure as a progressive from january to a selected month. I load a table with year and month as dimensions and an amount as a measure. For year and month selected I want to show the sum of monthly amount from january of the year selected to the month selected. I don't want to show this sum as a partial sum in the chart. The mechanism is similar to a year to date calculation.

Any suggests to me, please. Thanks

5 Replies
Not applicable
Author

Hi

Try

sum({$<Year = {$(=only(Year))}, Month = {"<=$(=max(Month))"}>} Amount)

Regards

Anders

Not applicable
Author

Hi,

I have replaced your expression to sum(Amount) in my pivot chart but I haven't the result desired.

In my table I have:

- Year = 2011, Month = 1, Amount = 500

- Year = 2011, Month = 2, Amount = 600

- Year = 2011, Month = 3, Amount = 1000

I want to show 2100 when I select year = 2011 and month = 3.

Thanks

Not applicable
Author

Hi

I have attach an example.

Regards

anders

Not applicable
Author

Oh, thanks, but I have applied your sample that it doesn't function for my document. In my pivot chart I have another dimension before Year and Month, fe Person Name. In this case, do I change your set analysis expression? For each person it must be calculated the progressive amount with the fixed selected year and month between january and the selected month.

However, your sample is a bit different from what I'd like to do. I don't want the progressive amount with the compressed year or, in other terms, when I expand the year I'd like to show for january the amount equals to 500, for february 1100 (500 + 600) and for march 2100 (500 + 600 + 1000). For a selected month I must show the progressive amount from january to the selected month.

Thanks

Not applicable
Author

Hi

I have attach a new example

Regards

Anders