Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
christina_muell
Contributor II
Contributor II

Variable as dimension

Hey there,

I want to see some of my variables in combination with other fields in one dimension for an table (as shown in the example)

Maybe somebody has an idea?

Thank you Tina

9 Replies
vishsaggi
Champion III
Champion III

May be this see attached.

Use a straight table here.

Like add dim: Value_field

Expr:

= IF( Value_field = 'profit',profit,

  IF( Value_field = 'Sales_margin', [sales margin], Sum(Value)))

christina_muell
Contributor II
Contributor II
Author

Hey

Thank you for your answer!

It works! But if I select now a other field like for example a region, the variables disappear. (see attached)

I dont know how to solve that problem!

vishsaggi
Champion III
Champion III

What is that you want to see when you click on the region? I mean you want to see the values 15 and 2 in your profit and Sales_margin or 0's for these values?

christina_muell
Contributor II
Contributor II
Author

No I wanna see the values, that only belong to the selected region.

So for Nord 6 for Sales Margin and 2,5 for profit!

Thank you

vishsaggi
Champion III
Champion III

Ok will look into it. If not may be stalwar1‌ can help on this.

sunny_talwar

May be try this

= IF(Only({1}Value_field) = 'profit',profit,

  IF(Only({1}Value_field) = 'Sales_margin', [sales margin], Sum(Value)))

vishsaggi
Champion III
Champion III

Superb. Cant believe completely forgot about this Only().

christina_muell
Contributor II
Contributor II
Author

Thank you
The selecting of the regions is now working!

So one more question: If I have two different years now in my data and I wanna show only one year in one of the table columns, how can I manage to do this? Because if I put an set analaysis or an "and" in the if-function it of course only shows me 0.

For the sum-function in the end, it works of course with a simple set analysis.

= IF(Only({1}Value_field) = 'profit',profit,

  IF(Only({1}Value_field) = 'Sales_margin', [sales margin], Sum({<Year={'2017'}>}Value)))

sunny_talwar

Where exactly do you see 0? Can you elaborate?

Capture.PNG