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

Barchart - show measure of measure as (100%) bar -And determin Color.

Hi

This answer has been asked before in this forum, and have been solved.

But I am having a hard time understanding/implementing the solution in my scenario.

I have two measures I would like to split in a stacked bar chart, so the highest measure is 100% of the bar chart, and the scond measure is the XX% of that 100%

Setup is as following:

Dimension:    =propertyNumber

Measure 1    sum(numberEG) (this is the 100%)

Measure 2:    Sum(numberEG30Day)

This is the result...

Barchart.JPG

So how do I configure my chart so -> sum(numberEG) will be 100% - and Sum(numberEG30Day) would be the % of the 100%..


And just to challenge people in here.....


I would like if sum(numberEG) is color #0A2864 and Sum(numberEG30Day) is color #E63F0C

1 Solution

Accepted Solutions
Anonymous
Not applicable

If I am understanding you correctly maybe something like this

Measure 1 :

  • 1 - (  sum(numberEG)  /  ( sum(numberEG) + Sum(numberEG30Day)  )  )

Measure 2 :

  • 1 - ( Sum(numberEG30Day)  /  ( sum(numberEG) + Sum(numberEG30Day)  )  )

View solution in original post

4 Replies
Anonymous
Not applicable

If I am understanding you correctly maybe something like this

Measure 1 :

  • 1 - (  sum(numberEG)  /  ( sum(numberEG) + Sum(numberEG30Day)  )  )

Measure 2 :

  • 1 - ( Sum(numberEG30Day)  /  ( sum(numberEG) + Sum(numberEG30Day)  )  )
varmekontrol
Creator
Creator
Author

Hi

That looked like that did the job...

I do not know why it suddently changed to 100% from the formular you used.

But nevertherless it worked.

Do you also know how to.

I would like if sum(numberEG) is color #0A2864 and Sum(numberEG30Day) is color #E63F0C

pradosh_thakur
Master II
Master II

set the back ground color of the expression by clicking expression-> back ground color then set the color u want to for the expression .. in your case you need to set the color for measure 1 and measure 2.

Learning never stops.
varmekontrol
Creator
Creator
Author

Pretty new at this, so correct me if I am wrong...

I converter my hex to arbg color.

ColorMix1((1+Sign(2*(sum(numberEG) - sum(numberLMC)-RangeMin (top(total sum(numberEG) - sum(numberLMC),1,NoOfRows(total))))/(RangeMax (top(total sum(numberEG) - sum(numberLMC),1,NoOfRows(total)))-RangeMin (top(total sum(numberEG) - sum(numberLMC),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*(sum(numberEG) - sum(numberLMC)-RangeMin (top(total sum(numberEG) - sum(numberLMC),1,NoOfRows(total))))/(RangeMax (top(total sum(numberEG) - sum(numberLMC),1,NoOfRows(total)))-RangeMin (top(total sum(numberEG) - sum(numberLMC),1,NoOfRows(total))))-1))))/2,ARGB(240, 140, 109, 1),argb(34,34,34,1))

And this was this was the result..

Bar.PNG

Would it be sossible so that the