Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

adarsh1612
Contributor

Need Help

Hi All,

Greetings,

I want to show % Change (this year vs last year) Positives values to be highlighted in Green and negatives in Red in horizontal bar chart. Can anyone help me.

Regards

Adarsh

6 Replies

Re: Need Help

Would you be able to share a sample to show what you have?

adarsh1612
Contributor

Re: Need Help

here this is the chart..............on right sidecaaa.png

neelamsaroha157
Valued Contributor II

Re: Need Help

If its about changing the color then you can use 'Background Color' option when you expand your expression and use calculation.

If((your_Calculation)>0, green(), Red()).Capture.PNG

Re: Need Help

What was the expression you defined for +ve and -ve values?

adarsh1612
Contributor

Re: Need Help

if(GetSelectedCount(Year)=0 and GetSelectedCount(Month)=0 ,

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=YearStart(Max([Invoice Date])))<=$(=Max([Invoice Date]))"}>}Customer_Name)-

Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(YearStart(Max([Invoice Date])),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name))/

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(YearStart(Max([Invoice Date])),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name)),

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=Min([Invoice Date]))<=$(=Max([Invoice Date]))"}>}Customer_Name)-

Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(Min([Invoice Date]),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name))/

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(Min([Invoice Date]),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name))

)>0,RGB(77,167,65),RGB(255,113,113)..

I am trying this but it is not working

adarsh1612
Contributor

Re: Need Help

if(GetSelectedCount(Year)=0 and GetSelectedCount(Month)=0 ,

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=YearStart(Max([Invoice Date])))<=$(=Max([Invoice Date]))"}>}Customer_Name)-

Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(YearStart(Max([Invoice Date])),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name))/

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(YearStart(Max([Invoice Date])),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name)),

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=Min([Invoice Date]))<=$(=Max([Invoice Date]))"}>}Customer_Name)-

Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(Min([Invoice Date]),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name))/

(Count( DISTINCT {< Year=,Month=, [Invoice Date] = {">=$(=AddYears(Min([Invoice Date]),-1))<=$(=AddYears(Max([Invoice Date]),-1))"}>}Customer_Name))

)>0,RGB(77,167,65),RGB(255,113,113)..

I am trying this but it is not working

Community Browser