Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master

How to make my bar chart min value not start from 0 value instead start from -1000000 ?

Hi All

My chart Y axis alway start from zero.

I like the chart Y Axis not start from zero , instead start from -1000000

Can some one advise me how to achieve this ?

https://www.dropbox.com/s/aqqvz7gpjerdxad/QV4FS_ver304%20ver%20012.qvw

above link is my QV Doc

Paul

1 Solution

Accepted Solutions
Not applicable

Hi,

Unclick "Forced 0" on both dimensions and then set the "Static Max" to -1000000

(since the scale is negative, -1000000 is actually the max value )

Attached is the result,

Cheers

View solution in original post

7 Replies
paulyeo11
Master
Author

Hi sir

Thsnk for your sharing.

Line chart I aware that can start at any value and not zero.so I think bar chart should also allow so.

The reason is if I view the whole value . I will not be able to see the problem as the stock value look normal if I plot start from 0.

I have try base on what you said . But unable to get it work.

Because my bar chart each bar come with individual expression.

Paul

Not applicable

Hi,

Unclick "Forced 0" on both dimensions and then set the "Static Max" to -1000000

(since the scale is negative, -1000000 is actually the max value )

Attached is the result,

Cheers

paulyeo11
Master
Author

Hi Sir

Thank you veyr much for your help , now it work fine. May i know how to make the chart display as +ve ? as it is not easy to train our mind read -ver chart.

Paul

paulyeo11
Master
Author

Hi Sir

Suddenly i remember i am able to make use of Fabs commend for make the -ve value turn +ve. So i try below but it does not work , why ?

      =money(if(fabs([Exec P&L Level] = 's','',Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-1),'YY MMM'))"}, month = ,year=>}[Amount])), $(vCurrency)))

Paul

Not applicable

FABS is supposed to outside of the IF-statement

=money(fabs(if([Exec P&L Level] = 's','',Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-1),'YY MMM'))"}, month = ,year=>}[Amount])), $(vCurrency)))

But this will make -1000 and 1000 the same. If you just want to switch signs, do

=money(-(if([Exec P&L Level] = 's','',Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-1),'YY MMM'))"}, month = ,year=>}[Amount])), $(vCurrency)))

Cheers

paulyeo11
Master
Author

Hi Martin

Thank you very much , it work fine for your first propose script which using fabs. ( Now my mind not so stressful ).

Now i seek your help , as my actual bar chart have 24 Bars , which display last 24 month stock amount.

when i need to make change i need to modify 24 expression , and set the min value to  start from 1000000, which need to click on 24+24 times, it there a way which allow me to just using 1 expression ? my figure is getting very busy. Any work around ?

Paul

Not applicable

I suggest you extract the year-month out of the expression use it as a dimension, and then only use one expression.

Cheers