Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have thought a lot about the naming of this thread so hopefully it makes sense [:|]. I have the following pivot table object in the enclosed QV application:
The object includes two calculations where Calc1 is only calculated when DIM_2 = A and Calc2 when DIM_2 = B.
Now - what I want to do is obviously to hide Calc2 when DIM_2 = A and Calc1 when DIM_2 = B or alternatively to use a macro to set the column width to 0.
Obviously, the problem is, that e.g. Calc2 is the same column under both DIM_2 = A and B, so changing the width under A will reflect the same change under B.... [:^)]
Is there a way that you can set multible widths of the Calc1 and Calc2 columns?
Regards,
Lars Madsen
Hi!
Thanks for your replies!
My query was initiated by another discussion on the forum. Referred to as a "Merged header issue" for Pivot tables my need is to control the visibility of DIM_2 in relation to DIM_1. Mergin the header of DIM_1 above DIM_2 gives a better visual presentation I think compared to adding an expression column for each calculation.
I will therefore direct the attention to this post since 'asomani' and 'john witherspoon' provide a briliant way to control the pivot table's merged headers and therefore also provide a workaround for hiding my empty calculations in the first example (though it's not exactly a solution to having multiple column widths apart to set them to zero = hide
Pls. refer to this post: "Merge headers in Pivot tables" http://community.qlik.com/forums/p/19453/74666.aspx#74666
See enclosed QV application as well. Loading an Inline table as a mask and combining with "pick(match" function will allow me to control exactly what members of the DIM_2 dimension should appear under DIM_1 which is another way of "hiding" obsolete members.
Thanks again guys,
Lars
Hi Lars,
I do not think it is possible to have more than one width on the same expression in a chart. A possible solution is to have multiple versions of the chart with teh same position on the screen but different column widths and to use a show condition to show the relevant chart given the selection on DIM_2. ie if B is selected suppress the A chart and show the B chart and vice versa.
Kind Regards,
Footsie
Hi Footsie
Thanks for the reply - I think you are right that this approach would work out in some cases. It's still a problem if I need both A and B visible at the same time but your proposal got me thinking
Regards,
Lars
Hi Lars,
You could have a third copy of the chart and in the show condition use getselectedcount(DIM_2)=0. This means you will have 3 charts altogether. Three charts might be a bit of a pain in terms of maintenance but it is a solution.
Kind Regards
Footsie
Hi Lars,
In such case you need to have 3 tables, one when nothing is selected and rest two based on selection. I know its not a good solution. but sometime we need to do like this.
OR rather I can suggest you to add a new column in your script, and in pivot tabel chart, you can have a calculated dimesnsion, where you can define if(value=a, X col ,b ) something on
Regards,
Amit
Hi!
Thanks for your replies!
My query was initiated by another discussion on the forum. Referred to as a "Merged header issue" for Pivot tables my need is to control the visibility of DIM_2 in relation to DIM_1. Mergin the header of DIM_1 above DIM_2 gives a better visual presentation I think compared to adding an expression column for each calculation.
I will therefore direct the attention to this post since 'asomani' and 'john witherspoon' provide a briliant way to control the pivot table's merged headers and therefore also provide a workaround for hiding my empty calculations in the first example (though it's not exactly a solution to having multiple column widths apart to set them to zero = hide
Pls. refer to this post: "Merge headers in Pivot tables" http://community.qlik.com/forums/p/19453/74666.aspx#74666
See enclosed QV application as well. Loading an Inline table as a mask and combining with "pick(match" function will allow me to control exactly what members of the DIM_2 dimension should appear under DIM_1 which is another way of "hiding" obsolete members.
Thanks again guys,
Lars