Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group by on key value, but show the corresponding description field in bar chart

Hi,

I am pretty new to Qlikview development and stuck while making a bar chart. Here's the scenario:

We're displaying a company data and bench-marking their data against all other companies in a bar chart. On the X-axis, we want to display the "ShortDescription" field and on Y-axis their corresponding values. The catch is, the field "ShortDescription" varies for different companies, so we can't group on that. However, they can be grouped by a key value, "nk_Attribute", but in that case values getting displayed on the X-axis is "nk_Attribute".

So my question is, how do I group the data on "nk_Attribute", but display the field "ShortDescription" in the bar chart.

Thanks!

4 Replies
tresesco
MVP
MVP

Could you post a sample?

mdmukramali
Specialist III
Specialist III

Dear ,

can you attach the file.

Thanks,

Mukram

MarcoWedel

Hi,

supposed I understood your requirements correctly, you want to group by the nk_Attribute field, meaning this would be your dimension. But instead of showing the nk_Attributes on the dimension axis, you want to show THE ShortDescription value. As you suggest the ShortDescription would vary between different companies, there can't be a single ShortDescription value per nk_Attribute value. Therefore I tried to create a calculated dimension that aggregates (concatenates) the ShortDescriptions over the nk_Attribute field. I used the dual() function to create numerical (nk_Attribute) dimension values to be able to sort the dimension numerically:

=Aggr(Dual(Concat(ShortDescription, ';'),nk_Attribute),nk_Attribute)

QlikCommunity_Thread_122519_Pic1.JPG.jpg

QlikCommunity_Thread_122519_Pic3.JPG.jpg

hope this helps

regards

Marco

MarcoWedel

Hi,

please close this thread if there are no further questions.

Thanks

Regards

Marco