Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
klrameet
Contributor III
Contributor III

Passing on default values as part of selection, for color by dimension via expression

Hi 

I am trying to define expression to control color of my bar graph, by dimension using a below expression but it's giving me error, not sure what's wrong.

if(ACCOUNT_TYPE <> ' ',if(getselectedcount([REPORT])=0,ACCOUNT_TYPE,{$<[ACCOUNT_TYPE]+={A,L,OBS}>}),0)

I want it to be able to pass the A,L,OBS values always, when there's a selection of report. otherwise the default graphs are turning gray. (LA & LB are the default bars that i always want to display regardless of the selection. (and graphs should display 3 different colors by the amount type

Expression for the amount measure is as below:

 

if(ACCOUNT_TYPE <> ' ' ,if(getselectedcount([REPORT])=0,Sum(AMOUNT)/1000000000,Sum({$<[REPORT_NAME]+={'LA','LB'}>}[AMOUNT]/1000000000)),0)

 

Labels (4)
1 Reply
Channa
Specialist III
Specialist III

if(ACCOUNT_TYPE <> ' ' and getselectedcount([REPORT])=0,ACCOUNT_TYPE, if(ACCOUNT_TYPE+=A,L,OBS,0))

Channa