Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
morenoju
Partner - Specialist
Partner - Specialist

Two measures on a line chart when one of them has no direct relationship to the dimension

Hi folks,

I have two tables with the following columns:

1) calendar_date, calendar_time, value

2) historical_date, historical_time, historical_value

I need to represent value and avg(historical value) on a line chart using the dimension calendar_time. calendar_date will always have one single date selected. historical_date can be more than one date, therefore the average.

For the historical, I was thinking of using Avg({<historical_time=P(calendar_date)>}historical value) however it's giving me a straight line as a result (which is wrong).

How can I represent both value and historical_value on the line chart with dimension calendar_time?

Thanks

Note: Normally, I would have just one table (calendar_date, calendar_time, historical_time, historical_value) and use alternate states, but since this is part of a dynamic view, alternate states are not supported.

Labels (1)
1 Reply
Dalton_Ruer
Support
Support

I assume the Historical values like Slowly Changing Dimensions or something for price/cost or whatever and aren't a  1-1 with the calendar data values. 

Set Analysis formulas are only evaluated 1 time per chart unless you combine it with AGGR. Here is an example: https://community.qlik.com/t5/New-to-Qlik-Sense/set-analysis-on-dimension-inside-AGGR/td-p/1709303