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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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.

Labels (1)
6 Replies
swuehl
Champion III
Champion III

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
Champion III
Champion III

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
Champion III
Champion III

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.