Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show past and future data together in the chart

Can any body please look into this and help,

I have two measures, i am showing the data by month,

if user select past dates till today is should show one measure, if user selects future dates it should show another measure.

in single chart

Please help

Thanks in advance

11 Replies
MarcoWedel

are you looking for two different expressions with a common canonical date, one delivering values for past and one for future times?

deepakqlikview_123
Specialist
Specialist

Hi ,

U can do ur calculaion at script side and use simplly use if statement in chart expression.

like

sum(sales) as m1,

sum(Quantity) as m2,

and expression side will be if(Date>today(),'m2','m1')

Thanks

Anonymous
Not applicable
Author

Hi,

we have to create inline table with the month column and use same inline table  column as listbox for selection.

Attached sample qvw.

Hope this helps. Let meknow if you are looking for something else.

Regards,

Chinna Venkat

Not applicable
Author

Hi Venkat,

Thanks for the response.

I will explain in bit detailed level.

i have one measure1 having only up to date  data from past ( only past and current data)

i have second measure2  having past and future data.

if user select the today date in the filter, it should show the data from today to jan 2014 from measure1, from tomorrow to dec 2014 from measure 2.

Hope it clear.

Thank you so much

Not applicable
Author

Hi Macro,

here is my scenario

i have one measure1 having only up to date  data from past ( only past and current data)

i have second measure2  having past and future data.

if user select the today date in the filter, it should show the data from today to jan 2014 from measure1, from tomorrow to dec 2014 from measure 2.

Hope it clear.

Thank you so much

Not applicable
Author

Hello Deepak,

i am using the same, but not working

deepakqlikview_123
Specialist
Specialist

Based on your information it seems you have intervals based on measure so please

try interval match function.

For that purpose craeted single column based on both measures and apply condition.

Thanks

Anonymous
Not applicable
Author

Hi Shriharsha,

Attached qvw will give the result based on the current selection.

Please make it as correct if result is as expected. So that people will not spend time on it.

col1col2col3
201408100200
20140950300
20141020400

Thank you..

Venkat

Not applicable
Author

Can you please share the excel with me

Thanks