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

sum from different tables

I'm quite new to qlikview.  so wanted to know about "best practice" on a sum if we are doing in our qlik view.

At the moment we are doing af below.  Were you can see date an Currency "check"

<CODE>

if($(vGBPConversion)=1,

Sum ({$<CalendarYear = {$(=Max(CalendarYear))}>} [Sales LCY F4])

,

//same formular - but in Euro - ExRate

((Sum ({$<CalendarYear = {$(=Max(CalendarYear))}>} [Sales GBP F4]))))

</CODE>

Now we would like to ad yet a dimension. the "F4". Which is our forecast/Budget.  Of these we have 5 different.  BU , F1, F2, F3 and F4.

Today we have 5 object pivots for everytime we are comparing sales to budgets.  We would like to remove 80% of these, by putting them into 1.

so our question are how to do this.? and preferably in a way so we also remove 80% of the calculations. to get some better performance.

as a side note  every forecast are in it's own table. with the same tags. so it's also called Sales LCY F3 etc.

We would love to have an option to choose what table 1 column in the object are calculating in, WITHOUT doing is as a filter(very important)   so lets say we could create a slider with the 5 table names, and selecting 1 of the options in this slider would not affect the filter, only the  SUM function would the look into that table..     And we could then maybe create a second slider for comparison options?

But can this be done? And How?

we would need help with how to create the slider if this is possible. and maybe also the code.

Our thoughts on the code would be (not in real code, just to show)

10 Replies
Anonymous
Not applicable
Author

So I have been creating Variables to put it into the label names.  so i would only need to change it a few places, if i ever wanted to change anything. and to have the labels display the correct forecast.  But to avoid label names being to "fuzzy" to look at.

But this got me thinking.

This formula works perfectly


sum($(='[Sales LCY ' & Only({[Primary forecast]} [Forecast Actualities]) & ']'))

but i I create a variable called  PRIMARY   and it contains    Only({[Primary forecast]} [Forecast Actualities])

I can then create the formula  

sum($(='[Sales LCY ' & PRIMARY & ']'))


This makes it so much easier to look at, and to get an overview.   Would i run into any problems doing it this way instead?   And would it impact perfoms if i change alot of formulas, to look at the variable instead?