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

Aggr in graph when last value is 0

Hi everyone 😊

I am trying to create a line graph that for each month, counts the cumulative year % of "Correct", "Incorrect" and "Partial" elements.

I've created the expressions using aggr() but when they count 0 elements of one type, the cumulative value is not shown. I understand that it won't calculate anything if there aren't values during the year (it happens with "Incorrect" elements), but it should show values if the previous months had them ("Partial" elements).

These are my expressions: 

- Correct: 

aggr(rangesum(Above(Count({$<Date= {"*"}, GeneralStatus = {'Correct'}, Closed = >} distinct Id),0, rowNo())), TheYearDate, TheMonthYearDate) / aggr(rangesum(Above(Count({$<AStatus = {"*"}, BStatus= {"*"}, Cstatus= {"*"}, Closed= >}distinct Id),0, rowNo())), TheYearDate, TheMonthYearDate)

- Incorrect:

aggr(rangesum(Above(Count({$<Date= {"*"}, GeneralStatus = {'Incorrect'}, Closed = >} distinct Id),0, rowNo())), TheYearDate, TheMonthYearDate) / aggr(rangesum(Above(Count({$<AStatus = {"*"}, BStatus= {"*"}, Cstatus= {"*"}, Closed= >}distinct Id),0, rowNo())), TheYearDate, TheMonthYearDate)

- Partial:

aggr(rangesum(Above(Count({$<Date= {"*"}, GeneralStatus = {'Partial'}, Closed = >} distinct Id),0, rowNo())), TheYearDate, TheMonthYearDate) / aggr(rangesum(Above(Count({$<AStatus = {"*"}, BStatus= {"*"}, Cstatus= {"*"}, Closed= >}distinct Id),0, rowNo())), TheYearDate, TheMonthYearDate)

This is what I get:

leyre_comansa_0-1655205640117.png

It doesn't show Jun values for "Partial" elements (it should be 15.09%). How could I get them all?

It would be great if I could also show "Incorrect" elements (0 every month). I don't have the option: "Suppress Zero-Values" selected.

Thanks in advance

Labels (2)
0 Replies