Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

My Dimension Expression error unable to make all my Bar same height.

Hi All

I have a Bar Chart which display Expense by year stack with different expense type.

I want to make the Bar same height . So that i can view the % contribution by expense type.

My expression as below is okay :-

Sum({<eXP={eXP}>}Amount/1000)

My issue is I try the below but it does not work, mostly likely is the area i mark red :-

=if(aggr(sum({<eXP={eXP}>}Amount*-1),$(ColumnDim101)) / aggr(sum(total <$(ColumnDim_p)> {<eXP={eXP}>}Amount*-1), $(ColumnDim101)) > 0.001, $(ColumnDim101), 'OTHERS')

Now the chart is display the total expense by year. Hope some one can share with me.

PAul

1 Solution

Accepted Solutions

Re: My Dimension Expression error unable to make all my Bar same height.

May be this:

Sum({<eXP={eXP}>}Amount*-1)/Sum(total <$(ColumnDim_p)> {<eXP={eXP}>}Amount*-1)

Capture.PNG

5 Replies
paulyeo11
Valued Contributor II

Re: My Dimension Expression error unable to make all my Bar same height.

my qv doc

psankepalli
Contributor III

Re: My Dimension Expression error unable to make all my Bar same height.

Sorry, if my understand is not correct. I can see only following expression at your attachement


Sum({<eXP={eXP}>}Amount*-1)


I just changed it to


Sum({<eXP={eXP}>}Amount*-1)

/

Sum({<eXP={eXP}>}Amount)


now you can see your chart 100% contribution. this way you can change your required expression.


if not please share your business logic.


HTH

Thanks

PR

paulyeo11
Valued Contributor II

Re: My Dimension Expression error unable to make all my Bar same height.

Hi Prasanna

Yes all the bar chart now same height , did you notice that all bar are same height. So it is wrong. the issue is on the dimension expression.

Paul

Re: My Dimension Expression error unable to make all my Bar same height.

May be this:

Sum({<eXP={eXP}>}Amount*-1)/Sum(total <$(ColumnDim_p)> {<eXP={eXP}>}Amount*-1)

Capture.PNG

paulyeo11
Valued Contributor II

Re: My Dimension Expression error unable to make all my Bar same height.

Hi Sunny

thank you very much

Paul

Community Browser