New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now
cancel
Showing results for
Did you mean:
Highlighted
Creator III

Hi,

i want to add up count values. I try it like this, but it doesn´t work:

Count({<[prodYear] = {"\$(=getfieldselections(Year))"},[prodMonth] = {"Nov"}>}products) + Count({<[prodYear] = {"\$(=getfieldselections(Year))"},prodMonth = {"Okt"}>}products)

The dimension in this chart is prodMonth.

My target is to add up allways the number of products for the last three month.

In Sep i want the sum of products for Jul, Aug, Sep

In Okt i want the sum of products for  Aug, Sep, Okt

etc.

How can i do it?

regards,

sam

1 Solution

Accepted Solutions
Highlighted
MVP

My bad, forgot to end the set analysis correctly

RangeSum(Above(Count({<[prodYear] = p(Year)>} products), 0, 3))

10 Replies
Highlighted
MVP

May be try like this:

RangeSum(Above(Count({<[prodYear] = p(Year)>} products), 0, 3))

Highlighted
MVP

or this if your months are sorted in descending order

RangeSum(Below(Count({<[prodYear] = p(Year)>} products), 0, 3))

Highlighted
Creator III

Thanks. The chart shows no data. There are no expression errors in the editor. Is missing a comma or something? I can´t find the reason.

Highlighted
MVP

My bad, forgot to end the set analysis correctly

RangeSum(Above(Count({<[prodYear] = p(Year)>} products), 0, 3))

Highlighted
Creator III

Perfect, now it works, thanks a lot 🙂

The chart shows always numbers like 30,23k and i want to see the normal number like 30230. So i put this expression in a textfield to see the normal number only for "nov" (sum for sep,okt,nov). But this expression shows 0

RangeSum(Above(Count({<[prodYear] = p(Year), prodMonth = {"Nov"}>} products), 0, 3))

What´s wrong and how can the chart show normal numbers?

regards,

sam

Highlighted
MVP

I guess change your number formatting from here:

Highlighted
Creator III

Yes, very easy. I just looked for it and did not find it, but now, thanks one more time again

Highlighted
MVP

I am glad we were able to figure it out

Highlighted
Creator III

Hi,

i check the data and the sum for each month does not match those of the excel table

 My target is to add up allways the number of products for the last three month. In Sep i want the sum of products for Jul, Aug, Sep In Okt i want the sum of products for  Aug, Sep, Okt etc.