Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to have dynamic labels in the legend for my stacked bar chart.
Example data:
Company, Qnum, Response, Subtext
Albertsons, BL5.1, 1123, Mail
Albertsons, BL5.2, 12345, Internet
Safeway, BL5.1, 12345, Mail
Safeway, BL5.2, 123455, Internet
My measure expressions are:
Sum({$<Qnum={"BL5.1"}>}Response)
Sum({$<Qnum={"BL5.2"}>}Response)
resulting in stacked bar
Right now my label for each measure is just text: "Mail" or "Internet".
I'd like my label to automatically populate so that when the measure uses BL5.1 my label = Mail; for BL5.2 my label = Internet; without me having to type the label.
An IF statement would be something like: =IF(Qnum ='BL5.1',Subtext,null())
Qlik Sense likes that expression, but returns "-" in the legend. So it's not evaluating it correctly. I don't know how to write the expression to get the desired result.
Thanks
Found the solution on another post:
=Aggr([Subtext Alias (row)],Qnum='BL5.1')
Found the solution on another post:
=Aggr([Subtext Alias (row)],Qnum='BL5.1')