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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

Add calculated dimension

HI Qlikers

I would appreciate some assistance please.

I am trying to add a calculated dimension so that the results of the dimension are filtered by location UK

So, i am adding the Dimension UK but i would like to filter these resluts by Another dimension ERP Location and the Value UK.

the closest i get to something like the required is


({$<[ERP LOCATION]= {'*UK*'}>} [Customer Name])

should i be using AGGR?

I would like to add a calculated dimension for [CUSTOMER NAME] so that only results from the dimension [ERP LOCATION]=UK show

If anybody could help i can apply this throughout my doc.

Thank you in advance.

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Use calculated dimension as below

AGGR( if( WildMatch([ERP LOCATION],'*UK*'),[CUSTOMER NAME]) , [CUSTOMER NAME] )


or


AGGR( only({<[ERP LOCATION]={'*UK*'} >} [CUSTOMER NAME]) ,  [CUSTOMER NAME] )


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

View solution in original post

14 Replies
vinieme12
Champion III
Champion III

Use calculated dimension as below

AGGR( if( WildMatch([ERP LOCATION],'*UK*'),[CUSTOMER NAME]) , [CUSTOMER NAME] )


or


AGGR( only({<[ERP LOCATION]={'*UK*'} >} [CUSTOMER NAME]) ,  [CUSTOMER NAME] )


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

instead you can use the set analysis in your expression like below as calculated dimension impacts performance and not advisable

sum({$<[ERP LOCATION]= {'*UK*'}>} Sales)

suryaa30
Creator II
Creator II

Use double quotes

sunny_talwar

I second that

srishsum2017
Creator
Creator

AGGR(if( WildMatch([ERP LOCATION],'*UK*'),[CUSTOMER NAME]) , [CUSTOMER NAME] )

Sumit Kumar Srivastava
davyqliks
Specialist
Specialist
Author

Thank you Vineeth Pujari

looking good on the syntax from

=AGGR( only({$<[ERP LOCATION]={'*HK*'} >} [CUSTOMER NAME]) ,  [CUSTOMER NAME] )

But i am only getting one response in the results and this should not be the case. I should be showing all customers where the location is HK/UK

I have ensured that both the  Customer and ERP location dimensions are connected by table. Do you have any idea why this would only show one return with a - and not a customer name?

Thank you

davyqliks
Specialist
Specialist
Author

THank you for the response

I changed sales to customer name

sum({$<[ERP LOCATION]= {"*UK*"}>} [Customer Name])

And also tried with double quotes but in the table i see error in calculated dimension.

Any Ideas?

Thank you again for all the knowledge shared guys.

sunny_talwar

This is not used as a dimension... this set analysis expression needs to be used within your expression... then chart where you are using this as a dimension.... what are your expressions?

Kushal_Chawda

If write this expression, you don't need calculated dimension, just use Customer Name as dimension and check the suppress null values option