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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
razvan_brais
Creator III
Creator III

Show all DEPARTMENT`s even if value is null

Hey guys,

Hope you can help me with some problems.

I`m trying to display in the same time all sales of different kpi`s for each department id for current day and previous day. But the problem is that when I add them in the same chart it shows me only department id`s from current day.

When I`m adding all the info from FINAL_TABLE in a pivot table , all values for current day (POINT IN TIME = 'CD') are correct , but for

previous day (POINT_IN_TIME = 'PD') are not so correct.

What I have noticed is that I have some differences on some kpi`s because for the 'PD' are not brought all DEPARTMENT_ID`s. In the table are kept only the DEPARTMENT_ID for 'CD' .

I`m adding an Excel File and a qvw project in which I kinda show what I want to obtain.

The table with two expression is what I get , and in the second table is what I want to have on the second expression from first table. Hope you can help me.

One idea that comes in mind is that i need to set DEPARTMENT_ID`s value to 0 if there is no data . But I don`t know how can I do that in the script.

Can you please help me on what to do in script that I can have all values?

Thank you,

Razvan.

28 Replies
razvan_brais
Creator III
Creator III
Author

Any ideas? I`ve tryed with PEEK , PREVIOUS but doesn`t work

sunny_talwar

I mean it is def. doable, but I the script can and will become fairly complicated in a sense that I will provide you with a solution which works in some scenarios, but not in other scenarios which you might not have pointed out or those which we both have not foreseen.

Knowing a fixed number to go back to might make sense.... having said that... this seems like a perfect candidate for front end solution using Above()... have you tried that?

sunny_talwar

If you have QV12 or above... the app should work for you

Capture.PNG

razvan_brais
Creator III
Creator III
Author

But isn`t there a way to refer only on the dates that are saved in the file? I would like to avoid calculations in front end because there is an enormous ammount of info , and lot`s of calculations to be made , and that will only will aggravate the functionality of the application.

sunny_talwar

Like I said that there might be... but it will not be easy + it may or may not cover all your different scenarios... does that make sense?

razvan_brais
Creator III
Creator III
Author

Nope , that doesn`t make sense at all. I need to cover all scenarios. but , let`s say that I won`t have data only for sunday (considered as weekend day) , how the script will look?

razvan_brais
Creator III
Creator III
Author

Done ,

Hope it`s ok. Thank again for your help

Can you please take a look and say if it`s correct?

sunny_talwar

Is it giving you what you need? If it is, then I don't see what might be the issue

razvan_brais
Creator III
Creator III
Author

Hey ,

There is no issue , I just wanted to make sure is the right approach.