Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with combining two sources in the single chart

Hello everyone,

Please look into the sample qvw file, i have year, and two charts from two different source,

PAST chart having only the data for past months ( for current month till date)

PAST and FUTURE chart having past month, from tomorrow till month end and future month.

i need to create a chart with past data(Source1.Revenue). from past month, future data from past and future chart(Source2.Revenue).

if you select 2014 the chart should have three bars, combining past and future.

the data should aggregate based on the current date.

If data aggregation is not possible on the date, we can show the past data till previous month, future data from current month

Thanks

9 Replies
rubenmarin

Hi Sreeharsha,

I'm not sure to understand the requirements, you searching for an expression like?:

=Sum({<Date={'<$(=Today())'}>}Combine_fact.Source1.Revenue) + Sum({<Date={'>=$(=Today())'}>} [Source2-1.Source2.Revenue])

or

=Sum({<Date={'<$(=MothStart(Today()))'}>}Combine_fact.Source1.Revenue) + Sum({<Date={'>=$(=MonthStart(Today()))'}>} [Source2-1.Source2.Revenue])

Hope this helps.

Regards.

avinashelite

Hi Sreeharsha,

I did not get your exact requirement, please see the attached file.

Please post the snapshot of what your trying to achieve and explain it.

Not applicable
Author

Hello Avinash,

i need to show the past data from one measure, future data from one measure. i have two different measures.

i can not combine two measures, because first measure having past data, and second measure having past and future data

Thanks

rubenmarin

Hi,

Again not sure of the exact requirements, check the attached file.

Regards

Not applicable
Author

Thanks Ruben,

You got my issue, but i don't need those past and future values, since i have too many measures to show in the chart, i tried to remove those things and checked, it i snot working.

Can we have only one value without any legend

Thanks again, it will be great help

rubenmarin

Glad to help

In my last example i added two graphs, the bottom-right graph has the past and future values, the bottom-left graph has the same calculations in one value.

Using the bottom-left graph meets your requirements?

Regards.

Not applicable
Author

Thanks Ruben for quick response

yes bottom-left graph is my requrements, both in one value, but no legend i needed. without colors.

Thanks

Not applicable
Author

Can any body tell what is the problem with this expression, i wrote this syntax for above scenario, i am getting the values for the past from measure1, am not getting fueture values from measure2.

=avg({<Date={'<=<$(=Today())'}>}measure1) + avg({<Date={'>=$(=Today())'}>}[measure2)

Thanks

rubenmarin

I see something that may be incorrect:

=avg({<Date={'<=<$(=Today())'}>}measure1) + avg({<Date={'>=$(=Today())'}>}[measure2)

That <= shouldn't be there, only the '<' I left black, if you get '<=', today values are get from past and future measure.

=avg({<Date={'<=<$(=Today())'}>}measure1) + avg({<Date={'>=$(=Today())'}>}[measure2)

That '[' is a typo or is really there?

Corrected expression could be:

=avg({<Date={'<$(=Today())'}>}measure1) + avg({<Date={'>=$(=Today())'}>}measure2)