Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dimensions Swapped

For example:

Pub ID   Pub Name   Aggr

1           Sports        3

2           Sports        2

3           Retail         5

...

I need to create a bar chart with:

Dimension = PubID

Expression = Count(Aggr)

But, finally I want to display on the chart Dimension as Pub Name and it shold show Sports two times (because of different Pub IDs).

Would appreicate any ideas.

6 Replies
swuehl
MVP
MVP

Try using

dual( [Pub Name], [Pub ID] )

as dimension, either by creating a new field in your load script or as calculated dimension.

Anonymous
Not applicable
Author

It works for the example above but when I try it on actual data model, it does not seem to work.

I wonder this is because these values come from two different tables ?

swuehl
MVP
MVP

So how does your data model looks like? Could you post some more details or a small sample app?

Anonymous
Not applicable
Author

Attached (with the very first message from me) a sample.

swuehl
MVP
MVP

Can't really see a problem, I still get as result

=dual([Pub Name],[Pub ID]) count(Aggr)

3
Sports 1
Sports 1
Retail 1
Anonymous
Not applicable
Author

I understand, it works perfectly fine on the sample but somehow not on actual data i have.