Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
vvira1316
Specialist II
Specialist II

Value on top of bar chart is not showing for all bars and sort is not working for one of them

Hi,

I've four bar charts with same/similar formula except the dimension used in them is replaced

Formulas are as follows for

Expression Chart#1

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension1-1]-={'-'}
>}
[Dimension6])

Sort Chart#1

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension1-1]-={'-'},
[BarChartDimension2]={'*'}
>}
[Dimension6])

Expression Chart#2

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension2-1]-={'-'}
>}
[Dimension6])

Sort Chart#1

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension2-1]-={'-'},
[BarChartDimension2]={'*'}
>}
[Dimension6])

Expression Chart#3

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension3-1]-={'-'}
>}
[Dimension6])

Sort Chart#1

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension3-1]-={'-'},
[BarChartDimension2]={'*'}
>}
[Dimension6])

Expression Chart#4

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension4-1]-={'-'}
>}
[Dimension6])

Sort Chart#4

=Count({<
[Dimension1]={'>0'},
[Dimnesion4]={Value1*',Value2*'},
[BarChartDimension4-1]-={'-'},
[BarChartDimension2]={'*'}
>}
[Dimension6])

On Sort except expression all other check box are unchecked for both dimensions (i.e. BarChartDimensionN-1, BarChartDimension2)

But sort on Chart #3 is not working. Values on top of most bar is not showing up except when second dimension value is equal to orange color

I'm having difficult time to figure out the reason. Tried few changes but none of them seems to be working. Please review screen shots below

SortNnoOnBar1.png

expression.PNG

Sort.PNG

Presentation.PNG

Any help/guidance will be appreciable.

Thanks,

Vijay

1 Solution

Accepted Solutions
sunny_talwar

I guess I am not sure how to show the total for MValue12, but the 0 bar is removed from the bar chart using calculated dimension....

View solution in original post

19 Replies
sunny_talwar

You have really put in a great amount of effort to put this thread together. Kudos for that, but I think this kind of thing can only be something you can play around with and do test to actually see why it isn't working. I am not sure if you already know this or not, but you can hide all the confidential information and share your app for people here to look at.

Preparing examples for Upload - Reduction and Data Scrambling

Is that something you will be able to do?

vvira1316
Specialist II
Specialist II
Author

Hi Sunny,

Thanks for your response. I was thinking the same that attaching QVW will make more sense. I'm aware of data reduction and scrambling. There are other reasons (large and complicated data model/policies) so I will see how I can make it available here. I'll be only able to do it on Monday when I go back at work till than have a good weekend.

Thanks & Regards,

Vijay

vvira1316
Specialist II
Specialist II
Author

Hello,

here is the data and qvw

In this the sort order for chart 3 is working.... I think it may be because the data model in the example is just one table versus the original qvw has much more complicated data model, and some of the data points for the chart are coming from different tables.

data value is still not showing up on charts....

Thanks,

Vijay

sunny_talwar

Don't really understand the behavior, but see if this work around can work

Capture.PNG

With regards to sorting, I won't be able to comment unless I see what might be going wrong.

vvira1316
Specialist II
Specialist II
Author

Hi Sunny,

What changes you made? Can you please share that so I can understand more.

Thanks,

Vijay

sunny_talwar

1) Changed the expression

=If(Dimensionality() <> 1,

Count({<

[Version]={'>0'},

[ATDS]={'EDC*','CiMark*'},

[T_S]-={'-'}

>}

[AT]), 0)

2) Changed Text Color expression

=Alt(If(ACT='TE', RGB(0, 0, 0),

If(ACT='RE', RGB(255, 255, 255),

If(ACT='Other', RGB(255, 255, 255),

If(ACT='GE', RGB(255, 255, 255),

If(ACT='CE', RGB(255, 255, 255)))))), Black())


3) Added Show Total on the Dimension Limits tab for your second dimension ACT

Capture.PNG

I believe those were all the changes I made

vvira1316
Specialist II
Specialist II
Author

Hi Sunny,

Thanks for you responses and help. I've figured out the issue with sort, I had to modify the expression and sort as follows

=Count({<
[Version]={'>0'},
[ATDS]={'EDC*','CiMark*'},
[T_S]-={'-'},
[ACT]={'*'}
>}
Aggr(RowNo(TOTAL), [AT], [T_S], [ACT]
))

After that I had changed it as per your suggestion and I have few questions that I've included in the screen shot below

BarChart1.png

if that is doable then it will be a prefect solution

Regards,

Vijay

sunny_talwar

Capture.PNG

You might be able to play around on the axis tab to have a max axis value equal to slightly more than the max bar.

Capture.PNG

Did you try to check 'Suppress Zero Values' on the presentation tab of chart properties?

vvira1316
Specialist II
Specialist II
Author

Hi Sunny,

I had 'Suppress 0 Values' but that I'm able to take care as it was because of some other information. 

bar length got reduced because of Total value is used in Axes, I tried manually setting the value and it helped

Can you please advise what will be the expression to just get a single value of 518 from my screen shot or 522 from your screen shot?

Thanks,

Vijay