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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Combining dimensions into one in chart

I have the following data table:

IDTargetCurrent
3245613
975452
321564
751227
325445

'Target' and 'Current' share the same values.

How can I create a chart like this, where I have COUNT(ID) as the expression, and the two dimensions as one?

cHART.PNG

Labels (1)
18 Replies
jessica_webb
Creator III
Creator III
Author

Thanks for the response. Would there be anyway to do this directly in the chart?

I'm having real troubles getting a new dimension into the script:

Re: Reload data with renamed fields

oscar_ortiz
Partner - Specialist
Partner - Specialist

Jessica,

Are you trying to produce something like this?

268478.PNG

Good luck

Oscar

jessica_webb
Creator III
Creator III
Author

Hi Oscar,

Thank you, but not quite...

The values for target and current aren't countable numbers - they're nominal.

So for example:

IDTargetCurrent
32456AC
9754EB
3215FD
7512BG
3254DE

So what I need is a count of each instance - not a sum...

Kushal_Chawda
MVP
MVP

Hi Jessica,

As per your requirement you need to change the structure of your data through script, that means it will be quite complex to do this on front end, perhaps I don't think that will be possible on front end.

oscar_ortiz
Partner - Specialist
Partner - Specialist

Maybe something like this then?

268478-1.PNG

Good luck

Oscar

qliksus
Specialist II
Specialist II

Just tweak the expression and add one more dimension

Dimension1: ValueList($(=Concat(DISTINCT Current ,',')&','&Concat(DISTINCT Target ,',')))

Dimension2 : =ValueList('Target','Current')

Expression : count(distinct if(Current=ValueList($(=Concat(DISTINCT Current ,',')&','&Concat(DISTINCT Target ,','))) and ValueList('Target','Current')='Current' , ID)) +

count(distinct if(Target=ValueList($(=Concat(DISTINCT Current ,',')&','&Concat(DISTINCT Target ,','))) and ValueList('Target','Current')='Target', ID))

jessica_webb
Creator III
Creator III
Author

Would you be able to provide me with your sample file that you did this in?

I've tried copying it into my own application, but it doesn't work for me...

jessica_webb
Creator III
Creator III
Author

But the data in your chart is incorrect. For example, you're showing a count of 1 for 'Target - C', but that should be 0

qliksus
Specialist II
Specialist II

Attaching is restricted in my network so pasting the screenshot of what I have done  can you post the error you are getting ?