Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
suneethi
Contributor II
Contributor II

rangesum above in a pivot with gaps in the data

Hi, 

I am trying to do a 3 month range sum in a pivot table using rangesum before - 

(rangesum(Before(total sum({<[PO Month Value]=>}[Total OT]),0,3)))

suneethi_1-1611887690088.png

There are gaps in the data. Is there anyway, in case of a null measure, I can have the rangesum of the previous 2 measures and put in the place of null and also the next one to consider the 2 months where the measures were not null?

For example in the screen shot - first row, Jun-20 is no value. I would like to have Apr-20+May-20 (+jun-20 which is null) to be there for Jun-20, and then have may-20+jul-20 (since Jun-20 is null) for jul-20 values?

So basically put 0s for the gaps (jun-20) without changing in the underlying data tables.

Thanks!!

 

 

Labels (1)
1 Reply
Ksrinivasan
Specialist
Specialist

hi,

Use Alt() like below

=Alt(Expression, 'Value If expression returns null')

Example:

=Alt(100/0, '0')

 

or try this link for more 

https://community.qlik.com/t5/Qlik-Sense-App-Development/Convert-Null-to-zero-in-Aggr-when-all-the-r...

Hope this helps you.

ksrinivasan