Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
it will not work like that bro
select 'TopPriority' as PriorityType,
if(SavingMoney='TopPriority',count(SavingMoney)) as TopSaving,
if(FindingJob='TopPriority',count(FindingJob)) as TopFindingJob,
if(Education='TopPriority',count(Education)) as TopEducation,
if(Child='TopPriority',count(Child)) as TopChild
from table
concatenate
select 'SecondPriority',
if(SavingMoney='SecondPriority',count(SavingMoney)) as SecondSaving,
if(FindingJob='SecondPriority',count(FindingJob)) as secondFindingJob,
if(Education='SecondPriority',count(Education)) as secondEducation,
if(Child='SecondPriority',count(Child)) as secondChild
from table
this will generate 5 columns
use PriorityType as ur Dimension
try build 4 measures and use stacked bar
Thank you for your solution! I am a little confused... If I add count[saving money], count[Finding/Keeping a job], etc as measures, what should I add for dimension?
4 measure for 'TopPriority' as static text in your script
union
4 measure for 'SccondPriority' as static text in your scriot
static text column should be ur dimension
Sorry I am new to Qlik, and still could not solve this issue... So you meant the dimension should be like
=Text(Top priority) ∪ Text(Second priority)
in script? I could not figure out how to add static text in my script and how to do a "union" between these two... Thank you so much for your help.
select 'TopPriority', sum(measure1),sum(measure2),sum(measure3),sum(measure4)
concatenate
select 'SecondPriority', sum(measure1),sum(measure2),sum(measure3),sum(measure4)
ur dimension is static text
Thank you so much for taking your time to explain...
I still cannot understand how to add static text on dimensions. I added Top priority there, but it said "Invalid dimension" as shown below. Also, how do you concatenate two dimensions?
it will not work like that bro
select 'TopPriority' as PriorityType,
if(SavingMoney='TopPriority',count(SavingMoney)) as TopSaving,
if(FindingJob='TopPriority',count(FindingJob)) as TopFindingJob,
if(Education='TopPriority',count(Education)) as TopEducation,
if(Child='TopPriority',count(Child)) as TopChild
from table
concatenate
select 'SecondPriority',
if(SavingMoney='SecondPriority',count(SavingMoney)) as SecondSaving,
if(FindingJob='SecondPriority',count(FindingJob)) as secondFindingJob,
if(Education='SecondPriority',count(Education)) as secondEducation,
if(Child='SecondPriority',count(Child)) as secondChild
from table
this will generate 5 columns
use PriorityType as ur Dimension
Thank you so much for your help! That solved my issues!