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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ignore dimension in calculation

I need to ignore dimension in my calculation.  So for exampe, I have location as my dimension... for location A, i want to be able to create a measure for location A in one column and location B in another column to be able to compare the two side by side.  Any ideas on how I would build an expression for location B on the line for location A?

8 Replies
johnw
Champion III
Champion III

sum({<Location={'B'}>} Measure)

But I'm betting your real requirement is more complicated than that.

Not applicable
Author

I tried to specify the location as you did above, but that doesn't seem to be working.  It may be due to how the data is setup though.

Not applicable
Author

You need a Total in there to get out of the dimension.

     sum({<Location={'B'}>} Total Measure)

Not applicable
Author

That did get a number to return, but it was the total for everything within that location.  Now, let me add another level of complexity... I have a second dimension of state, so I want the measure for location B, but only within the state on that line item.  I tried the following:

sum({<Location={'B'}>} Total <state> Measure), but no results returned for that.  Any ideas?

Not applicable
Author

try using the function dimensionality ( )  ....it should work....

SunilChauhan
Champion II
Champion II

i believe it simple like i understand

sum(total <State> if(Location='B',Measure))

sum(total <state>if(Location='A',Measure))

thanks

Sunil Chauhan

Sunil Chauhan
Not applicable
Author

I think dimensionality() func. is better if u have to ignore a particular dimension in any calculation in a pivot or a straight table.

thnxs

vivek

Not applicable
Author

I had to use some trickery, but I finally got this to work.  Thanks everyone for your help!