10 Replies Latest reply: Jan 10, 2018 2:30 AM by nikhil garg

# Prob in Bar Chart in QLiksense

Hello All,

In my qliksense, i ahve created a bar chart for Cur Yr and Prev Yr sales. But when i hover on any bar, it is showing other yr value as 0. Can anyone tell em how to suppress this?

Thanks,

Nikhil garg

• ###### Re: Prob in Bar Chart in QLiksense

Have you included cur Yr sales as another measure? Try that expression and check whether it is giving some value other than 0

• ###### Re: Prob in Bar Chart in QLiksense

Yes,

I ahve 2 measures:

curYrSales: LEt say value 100

PrevYrSales: Let say value 150

Now, if i hover on prev year, i got to see CurYr =0 and PrevYr = 150

aNd same for curYr. Any solution to this?

• ###### Re: Prob in Bar Chart in QLiksense

take a copy of chart and

delete one measure and check once and delete other and keep first and see.

and change the chart to straight table and see how the values look like?

• ###### Re: Prob in Bar Chart in QLiksense

Hi,

Try below ways,

1) suppress null or 0 value from your chart object  (fyi, uncheck below check box from your year and measure field)

2) by using set analysis method exclude those Sales 0  year value from chart list

let say example,

for current year sales

sum( {\$<Year={"\$(=Max(Year))"}, Sales={">0"}>} Sales)

for previous year

sum( {\$<Year={"\$(=Max(Year)-1)"}, Sales={">0"}>} Sales)

3) if your going to show in your bar always selected year and previous year then just use above two expression.

ThanksDeva

• ###### Re: Prob in Bar Chart in QLiksense

Hey,

1: Include Null values is already unchecked.

2: Set analysis didnt worked as expected.

Any other way?

• ###### Re: Prob in Bar Chart in QLiksense

HEy,

Problem is i am using Pivot table. ANd in pivot table, we dont have background color option in dimension

I cann't use straight table because, i ahve to dynamically name my measures as:

1: Sales' \$(=Only(Year)-1) and this function will only evaluate in Pivot Table.

ANy other option?

• ###### Re: Prob in Bar Chart in QLiksense

But, you have mentioned the problem is with hover in bar chart. Right?

How did pivot chart come to picture?

• ###### Re: Prob in Bar Chart in QLiksense

Hey,

pls ignore my pivot chart reply, that was by mistake

My problem is with bar chart:

Yes,

I ahve 2 measures:

curYrSales: LEt say value 100

PrevYrSales: Let say value 150

Now, if i hover on prev year, i got to see CurYr =0 and PrevYr = 150

aNd same for curYr. Any solution to this?

• ###### Re: Prob in Bar Chart in QLiksense

Is it possible to attach sample qvw or measure expressions?

• ###### Re: Prob in Bar Chart in QLiksense

HEy,

Pls find the expressions as below:

1: For Cur Year Sales:

=

if(vYTD = 1,

Sum({<Year = {'\$(vCurYear)'}, MonthNumber = {'<=\$(=vCurMonth)'}, [Transaction Type] = {'Sales'}>}Amount)/10000000,

Sum({<Year = {'\$(vCurYear)'}, MonthNumber = {'\$(vCurMonth)'}, [Transaction Type] = {'Sales'}>}Amount)/10000000

)

1: For Prev Year Sales:

if(vYTD = 1,

Sum({<Year = {'\$(vPrevYear)'}, MonthNumber = {'<=\$(=vCurMonth)'}, [Transaction Type] = {'Sales'}>}Amount)/10000000,

Sum({<Year = {'\$(vPrevYear)'}, MonthNumber = {'\$(vCurMonth)'}, [Transaction Type] = {'Sales'}>}Amount)/10000000

)