Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
demonioazul
Creator
Creator

Qlik Sense: Use of loaded measures in script

Hi there!

I need help with the following issue.

To make things simple, I have a similar script as the one here:

LOAD

    BusinessUnit,

    YTD,

    Pipeline

FROM xxx....;

but to create a stacked bar chart I need a new measure dependent on the ones I am loading first, so I need the following to work:

LOAD

    BusinessUnit,

    YTD,

    Pipeline,

    YTD - Pipeline as RunRate

FROM xxx....;

The data load of this script is successful with no errors, but RunRate has no values

I have tried to load variable names and their formulae from a script, which outputs the same result with only an additional step that provides no added value.

If I create a table visualization using the either script and in the measure fx field I use YTD-Pipeline (not the RunRate measure) it shows the correct values...

If I create a measure defining it in the Measures tab, it also works fine. However, I am not able to use it to create my stacked bar chart because defined like that it does calculate the values but it does not belong to any table...

I also tried a RESIDENT LOAD trying to add RunRate as follows:

TempTable:

LOAD

    BusinessUnit,

    YTD,

    Pipeline

FROM xxx....;

FinalTable:

LOAD

    BusinessUnit,

    YTD,

    Pipeline,

    YTD-Pipeline as RunRate

RESIDENT TempTable;

But that gives the very same results: no values in RunRate...

The goal is to be able to re-use measures in the load script.

Does anyone have a hint? It will be much appreciated. Thanks!

11 Replies
demonioazul
Creator
Creator
Author

Hi kaushik.solanki‌,

I noticed that from my Community profile Inbox it is not possible to reply and attach files.

As explained above, I thought it would be easy to just extrapolate the hint to a more complicated data load... but I could not do that...

I get the data from different sources (for this purpose I put the data in different tabs in the data file) and try to merge them in one app so I can make comparisons, visualizations and tables...( but it has proven more complicated than expected... I've using Qlik Sense almost two years now and this challenge is the hardest I ever had so far...)

Then, after merging those tables, I need to calculate  also an offset using the variables to generate a crosstable with two dimensions and one measure in order to be able to plot a stacked bar chart, Something like this:

EM TAR (ALL OPPS).jpg

which, by the way, I am able to create by having the table generated in the attached QVF and calculating manually the offsets...

But I want to have everything automated...

Or maybe my approach is wrong?

If I can accomplish to load a table similar to the one shown in the Sample - TAR.xlsx file, then I would be able to generate the table with no issues... but so far I haven't been able to find the right way...

I can generate each Business Unit (BU) or Business Segment (BS) chart separately by manually creating the tables for them, but that is not the case... I need Qlik Sense to do it for me...

I want that chart to show dynamically the information for any BU or any BS I choose...

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Demian,

I will sure go through the problem statement and the sample data. I request you to create a new post so that it can help others too.

Once you do that, please reply here with the post link, so that i can reply to that.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!