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: 
Anonymous
Not applicable

RangeSum Expression Color based on Dimension Value

I have what I believe is a seemingly simple request from a user but I cannot seem to make it work.

I have a RangeSum totaling sales order dollars for the year. The users want to hide the section of the rolling total for months prior to current month. This way, we still get the entire aggregation of orders for the year  but we don't see the line for the earlier part of the year. The reason for this is because we want to overlay another graph on top of this with actual shipments that would fill in this whitespace.

I have tried to set the color based on the background color setting on the expression to be something like:

If(ORDER_DATE_MONTHYEAR<vCurrentMonth,white()) but it doesn't work. How do I make that section white?

17 Replies
Anonymous
Not applicable
Author

Hi Sunny --

I've tried both all of these and none work:

If(num(ORDER_DATE_MONTHYEAR)<num(today()),white())

If(num(ORDER_DATE_MONTHYEAR)<=num(date(monthstart(today()), 'MMM-YYYY')),white())

If(only({1}num(ORDER_DATE_MONTHYEAR))<=num(date(monthstart(today()), 'MMM-YYYY')),white())

ramoncova06
Partner - Specialist III
Partner - Specialist III

Though the makedate is not needed with Date# Should be enough, this will give you the same result that my previous post

Date(Date#('May-2015','MMM-YYYY'))

sunny_talwar

You just need to check the two in a text object if they are Numbers or text before you use any of the ifs you just mentioned above.

Sent from my iPhone

Anonymous
Not applicable
Author

I've tried the following and still not working.

If(MAKEDATE(YEAR(Date#(ORDER_DATE_MONTHYEAR, 'MMM-YYYY')),(Month(Date#(ORDER_DATE_MONTHYEAR ,'MMM-YYYY'))),1)<Date(today()),white())

If(Date(Date#(ORDER_DATE_MONTHYEAR,'MMM-YYYY'))<Date(Today()),white())

Anonymous
Not applicable
Author

I checked them. The numbers are different - but it does not work in the color.

However, I did notice that I only got a number in the  text box when I had only 1 month selected.

Could it be a similar problem?

ramoncova06
Partner - Specialist III
Partner - Specialist III

I believe it might be a bug with QV and the graph style, since you only leave a line it does disappear

Anonymous
Not applicable
Author

Hi Ramon --

Here's a copy of the section on my app with this chart. Can you take a look? It's just a filled line chart.

Thanks!

ramoncova06
Partner - Specialist III
Partner - Specialist III

The issue I see is what that specific type of graph, bar chart works fine