Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to show total bar as first bar in bar chart in qlikview?
Have you tried my solution?
I added one column F0 and selecting value from F0. Its there in your last attached qvw
I have tried but I dont understand how pick is working using dim. why only two values (1,2) in dim?
He is just creating a island table which isn't connected to any other table in your database (so it won't filter 'Total' out because there is no relation with the other fields) and Pick is doing the following:
=Pick(Dim,'Total',F1) -> If(Dim = 1, 'Total', F1)
Pick is a nicer and cleaner way of writing an if statement.
Pick is having two values (1,2) which is used to Pick actual values
So, 1 will show 'Total'
2 will show all F1 values
So, Pick(Dim,'Total',F1) means First Display 'Total' (1) & then F1(2) Values in Dimension.
Try this:
If(Only({1}F1) = 'Total', (Sum({1<F2 = p(F2)>}TOTAL F2) - 8), Sum(F2))
Thanks. Its working. Can you explain me about logic?
Will try to break down the expression for you
Only({1}F1) -> Look at all F1s and ignore any selection made in the database ({1})
Sum({1<F2 = p(F2)>}TOTAL F2) -> Sum(TOTAL F2) but sum only those F2s which are available to be selected (F2 = p(F2)) and ignore any other selection.
Rest of the expressions should be pretty straight forward.
Best,
Sunny
Ok, Thanks. But when I select A in F0, I got 2,3,4 in F2 so If I add it will be 9 then subtract 8 will be 1 but in chart It is showing 11.
How?
I complicated the expression for no reason. Check this out:
If(Only({1}F1) = 'Total', (Sum(TOTAL F2) - 8), Sum(F2))