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

Data for my question related to Set Analysis

I have made an example qvd and and example xls for my question related tot Set Analysis

Big Question was how can i use Set Analysis when I watch my Excel.file where per month I have a daily amount, twice for the two companies I have and  that daily amount is also divided for Products and Batch: so per Company I have two daily Budgets. So I have 4 daily Budgets because at the Moment I have two companies.

Next is that for the ProductBudgets I have to divide the Budgets into Shares Percentages for Fittings and that for every Company

At the Moment I use if-statements in the Charts-expressions, but that is not flexibel. When in the future a new Company is added or a new Fitting is added I have to rebuild the expressions again.

That why I want to use set Analysis if possible

regards 

3 Replies
sunny_talwar

Which tab -> chart -> expression are we talking about? Also, I just you mentioned attaching an Excel file, but I only see a qvw attached?

vinieme12
Champion III
Champion III

instead of using If() in each expression create a variables for your evaluation

for example

vFieldToUse = if(company = 1 , 'field1' , 'field2')

and then in your expressions

=sum($(vFieldToUse))

this way you only have to edit the variable and not individual expressions

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

also instead of using nested IF's use set analysis

your expressions will be simpler

Set Analysis: syntaxes, examples

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.