Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
klrameet
Contributor III
Contributor III

Hide a Column/Display Sum Column Conditionally

Hi


I have this situation, where based on the consultant, selected, i needed to show/hide column of total amount billed so far.

e.g

For the below data, I am trying to create a table on right side, and based on selection, if the particular consultant was not billed in that state, i would like the column for that consultant to hide.

So for Location = VA, David didnt get billed, so only total for Adam & Eve should be displayed. otherwise all three, if there's no filter on location.

1.JPG

11 Replies
agigliotti
Partner - Champion
Partner - Champion

let's try with the below expression:


Sum( {< [Name] += {'Adam'} >} [Total] )


I hope it helps.

klrameet
Contributor III
Contributor III
Author

Hi agigliottizhandos_shotanvegar.lie.arntsen stalwar1 .thank you so much that pretty solved the problem except for a fact that i have another subsequent problem now .. .

Situation: I have to keep the first two plots, regardless of the selection users make, from the rest of the bars. eg when user select the third graph for drilldown/selection, graph should display 1+2 & the 3rd one or any other that he has selected, keeping 1 & 2 on always.

With your earlier help with expression, I could manage to keep the 1& 2 bars there always, but when the selection is made, the first two graphs are getting grayed out for some reason.

I can see that somehow the dimension determining color, is not getting assigned properly as highlighted in screen 2 & 3, whereas i can see it getting populated in header of tool tip.

The expression, i am using on reported total is:

if(getselectedcount([Name])=0,Sum([Amount]),Sum({$<[Name]+={L2,L3}>}[Amount]))

where L2 & L3 are name for the first two bars.

Capture3.png

Appreciate your help