Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kbd
Former Employee
Former Employee

Barchart with different labels than dimension

Hi

I have a table with persons and one table with occasions where the persons have been active. In the table with persons there are UserId and UserName. The problem I have is there are several persons with the same name, but of course different UserId. When I create a bar chart graph with persons as dimension and occasion as expression I would like to have one bar for each person. This works if I use UserId as dimension, but then the lable of the bar will be UserId. If I use UserName as dimension all users with the same name will added in one bar.

Does anybody have a suggestion how I can have the UserId as dimension, but the UserName as label on the bars?

Best regards Jonas Berglund

2 Replies
Anonymous
Not applicable

Here is an idea to try:
If UserId is numeric, use calculated dimension in your chart:
dual(UserName, UserId)
If it is not numeric, create a numeric uniqued Id for user, for example by using RowNo() as UserNumId, and your calculated dimension will be
dual(UserName, UserNumId)
I didn't try, but don't see a reason why it wouldn't work.

kbd
Former Employee
Former Employee
Author

Thank you, Michael, it worked staight away in the chart!

Best Regards Jonas Berglund