Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
madhuparnadhar
Contributor III
Contributor III

Null dimension label for line chart

Hi All,

I am trying to create a line chart showing revenue with a month-over-month comparison. So if I select 1st-3rd April, it should show me revenue for both 1st-3rd April and also 1st-3rd March. I used set analysis to achieve the results. I am getting the desired values and the graph looks as below :

Screen Shot 2019-04-04 at 12.17.06.png

But the issue I am facing is, since I have selected 1st-3rd April, the colour for March becomes grey and also it doesn't show any Month when I move my cursor over March line.

Is there any way in which I can display the dimension label and corresponding legends along with proper colours ?

Looking forward to everyone's inputs.

Thanks and Regards,

Madhuparna

Labels (2)
3 Replies
miskinmaz
Creator III
Creator III

Hi,

Use a dummy dimension using valuelist(like March, April) and in the expression use pick match of valuelist dim for the expression(Mar Sales and april sales).

Hope this help

madhuparnadhar
Contributor III
Contributor III
Author

Hi,

Can you explain it a little bit more on how to do it?

Thanks and Regards,

Madhuparna

miskinmaz
Creator III
Creator III

First create a inline table say

Load * Inline [

Month

Jan

Feb...

];

Make sure to have the association with the fact table or the calendar table.

Then in Dimension use

=if(Match(Month,'Jan','Feb'),Month)

and for Measures use

If(Month='Jan',sum({<Month={"Jan"}>}sales),

If(Month='Feb',sum({<Month={"Feb"}>}sales))) and so on.

 

You just have to figure it out how this is going to be dynamic which won't be a challenge.