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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kanalavs
Contributor
Contributor

Color alignment for stacked bar chart in Qliksense

Hi friends,

Below is my requirement and I am unable to implement the proper solution for this requirement.

I have Proposed (yellow)and Revised budget(green).If revised budget is zero I have to take Proposed Budget.If Revised is not zero I have to show revised budget.Based on below example my bar has to show Proposed-0,and revised(stacked bar with 40000(yellow) and 8000(green).

For example:

Proposed Budget for May  Revised Budget for May

10000                                           8000

20000                                           0.00

20000                                           0.00

Proposed Budget for June  Revised Budget for June ( In this case Proposed-0 and Revised is 60000 with yellow color)

20000                                           0.00

20000                                           0.00

20000                                           0.00

Below is my expression.

For Proposed Budget:

if(REVISED_BUDGET=0,IF([UNABLE_TO_SPEND]='NO',0,SUM(AGGR(SUM(distinct{<SUB_PROJECT-={'-'}>}[PROPOSED_BUDGET]),YEAR,type,SUB_PROJECT))),0)

For Revised Budget:

if(REVISED_BUDGET=0,IF([UNABLE_TO_SPEND]='NO',0,
SUM(AGGR(SUM(distinct{[SUB_PROJECT]-={'-'},[REVISED_BUDGET]-={'0.00'}>}[REVISED_BUDGET]),YEAR,type,SUB_PROJECT,MAIN_PROJECT))),
SUM(AGGR(SUM(distinct{<[SUB_PROJECT]-={'-'},[REVISED_BUDGET]={'0.00'}>}[PROPOSED_BUDGET]),YEAR,type,SUB_PROJECT,MAIN_PROJECT)))
+
SUM(AGGR(SUM(distinct{<[SUB_PROJECT]-={'-'},[REVISED_BUDGET]-={'0.00'}>}[REVISED_BUDGET]),YEAR,type,SUB_PROJECT,MAIN_PROJECT))

Please help on this.

 

 

Labels (1)
0 Replies