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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stabben23
Partner - Master
Partner - Master

Calculated dimension

Hi,

I need help, I want to reduce values in my dimension based on another dimension.

Lets say that I have Accounts 100, 101, 102 ,200, 201, 202.

These Accounts is grouped like A=100,101, B=200,201

Now I want to show Accounts based on Group A and B.

This will gives me Account 100, 101, 200, 201 in my dimension Account.

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

if you use only Group as a dimension and check Suppress null you will only see values with Group.

if you want to Account as Dimension, the create a calculated dimension : If(not isNull(Group), Account)

View solution in original post

14 Replies
giakoum
Partner - Master II
Partner - Master II

Then you need to have a grouping field, a table like this:

Account, AccountGroup

100, A

101, A

102, A

200, B

201, B

etc

and filter on AccountGroup

its_anandrjs
Champion III
Champion III

Make a calculated dimension in your load script like

A:

LOAD * Inline

[

Accounts

100

101

102

200

201

202

];

Main:

LOAD

*,

if(Match(Accounts,100,101,102),'Group A',

if(Match(Accounts,200,201,202),'Group B')) as GroupAccount

Resident A;

DROP Table A;

Hope this helps

stabben23
Partner - Master
Partner - Master
Author

I have, and this is in a pivot table.

I need to use calculated dimension.

giakoum
Partner - Master II
Partner - Master II

I don't understand. if you have it, then why don't you use in the dimension? Why do you need a calculated one?

stabben23
Partner - Master
Partner - Master
Author

This is not script issue, I have all tables and the grouping already.

MK_QSL
MVP
MVP

You can use as below...

Load

Account,

IF(Left(Account,1)=1,'A','B') as Group

Inline

[

  Account

  101

  102

  103

  201

  202

  203

];

stabben23
Partner - Master
Partner - Master
Author

Because I dont want to se 102 and 202 in my dimension.

giakoum
Partner - Master II
Partner - Master II

Then use the grouping field as dimension.

MK_QSL
MVP
MVP

What is the exact required output you want?

can you be more specific please !