Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to show total bar as first bar in bar chart in qlikview

how to show total bar as first bar in bar chart in qlikview?

34 Replies
sunny_talwar

What is your expected Total now?

Not applicable
Author

attached same qvw we discussed. how to show Total as first bar

sunny_talwar

Oh got it

sunny_talwar

I think you will need to do something in the script for the that. Does working in script an option? Look at this, it also is on similar lines -> How to show the "total" bar at the left most of the bar chart

sunny_talwar

See if this helps:

Capture.PNG

Script:

Table:

LOAD * INLINE [

    F1, F2,F3

    P1, 2,1

    P2, 3,2

    P3, 4,3

    P4, 4,7

    P1, 2,3

    P2, 5,9

    P3, 4,1

];

Concatenate (Table)

LOAD 'Total' as F1

AutoGenerate 1;

Expression1:

If(F1 = 'Total', (Sum(TOTAL F2) - 8), Sum(F2))

Expression2:

Sum(F3)

Sorting Expression:

=Match(F1, 'Total', 'P1', 'P2', 'P3', 'P4')



Not applicable
Author

Hi,

Its absolutely right for current scenarion. but If one more column is added to inline load. In that case If I select any value from that column. Total will disappear as It is not having any value related in new column.

Added qvw.

Kushal_Chawda

Further simplified

LOAD * INLINE [

    F1, F2,F3

    P1, 2,1

    P2, 3,2

    P3, 4,3

    P4, 4,7

    P1, 2,3

    P2, 5,9

    P3, 4,1

];

LOAD * Inline [

Dim

1,

2 ];

Create the chart


Dimension:

=Pick(Dim,'Total',F1)


Expression1:

=Pick(Dim,

Sum(total F2) - 8,

Sum(F2))

Expression2:

=Pick(Dim,

0,

Sum(F3))

In Sort Tab Expression

=Pick(Dim)


Capture.JPG

sunny_talwar

See if this helps:

If(F1 = 'Total', (Sum({1<F2 = $::F2>}TOTAL F2) - 8), Sum(F2))

Not applicable
Author

If you select then, total is not showing

sunny_talwar

What selection are you making?