Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
valera_sh
Creator II
Creator II

Override current dimension value in chart

I'm trying to build a table:

table.PNG

What I need is to show the actual previous month value (M-1) from the data model, not from the chart.

Using Above() is a bad idea because M-1 for "2018-Jan" shows null. My data range from 2012, so there is a value for 2017-Dec, but I can't get it.

How can I get the number of nights for 2017-Dec for the dimension 2018-Jan?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

4 Replies
swuehl
MVP
MVP

For example using

The As-Of Table

swuehl
MVP
MVP

valera_sh
Creator II
Creator II
Author

I was wondering if it was possible to solve this problem purely in the chart formula.

Apparently, not.

I'll proceed with this solution.

Thanks.

valera_sh
Creator II
Creator II
Author

Actually, I found a solution without creating a new table thanks to the above post.

The winning formula is

sum(

  aggr(

    above(sum({1} Nights)),

    YearMonth

  )

)

"Calculate sum of nights for all the available dates, for each date get previous; intersect with the current chart context".

Brilliant.

Thanks.

Brilliant_Above.PNG