Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Dimension- Filter with set analysis

Scenario:

I have the following fields CompanyName, Sales, Assets and AssetsFlag (has values 0 and 1).

I am giving the user a button so we can choose to see in the chart the Sales and the Assets aggr by CompanyName. But not all companies has Assets (AssetsFlag = 0). The user does not want to see in the chart the companies without Assets.

The QV documents has already many dependencies, so the best option is to add a calculated dimension.

But how can I filter the values in the calculated dimension?

That's was my ideia:

If (Button= Assets, CompanyName( -- with flag that = 1, CompanyName).

How can I create this type of calculated dimension?

Thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

May be this:

If(Button = Assets, Aggr(Only({<AssetsFlag = {1}>} CompanyName), CompanyName), CompanyName)

View solution in original post

4 Replies
sunny_talwar

May be this:

If(Button = Assets, Aggr(Only({<AssetsFlag = {1}>} CompanyName), CompanyName), CompanyName)

Not applicable
Author

Thank you for your help, the main functionality is working, but the name of the company comes as '-'.

But I think I can figure it out. Thanks once again!

sunny_talwar

You may need to select 'Suppress When Value Is Null' on the dimension tab to suppress null values in the dimension

sunny_talwar

If you got what you were looking for, I would suggest you to please close the thread down.

Best,

Sunny