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: 
pietapa
Contributor
Contributor

Table Condition with selected filter

Hello guys,
I have a question.  How I have to define the condition to my table so that I get zeros for all entries for a special filter? My table looks like below. 

pietapa_0-1672740463738.png

I tried this to see what happend: 
If(Filter1="S",0,1)
But when I select the S at Filter1 I get an error message : Condition for calculation not fulfilled.

My problem is that I have no data for this filter until Dec22. Therefore I wanted to show zeros all of my entries.
Thank you for help

Labels (1)
2 Replies
Mark_Little
Luminary
Luminary

Hi,

I do not fully understand your use case, so may not be the right solution. 

But if you are trying to evalute something being selected you want to use the GetFieldSelections() function

Something like

If(GetFieldSelections(Filter1)="S",0,1)

 

pietapa
Contributor
Contributor
Author

Hi @Mark_Little 
okay I try to explain it more understandable. 
My original data looks like that

pietapa_0-1672743999284.png

I have a region, date, Filter1, Filter2 and the count of this kinds. And If you can see if Filter1 is L or S there are no values for these months. To get an better overview I created a cross-table like above, where you have the count of every region for each month. Now what I would like to have is  if I select Filter1=S, my cross table should show  me for every cell 0 beside Dec-22. 


I tried your suggestion but it does not work 😞