Skip to main content

Hi Hina,

 

Create calculation like below

 

Re: Filtering based on criteria

Add to context:

pastedImage_1.png

 

Filter Pane:

pastedImage_2.png

 

All:

pastedImage_3.png

 

Baseball:

pastedImage_4.png

 

tennis:

pastedImage_5.png

 

hope this helps

plz mark this answer as correct & helpful to close the thread

 

BR,

NB

답변 2개
  1. 2019년 5월 20일 오후 2:57

    So there are 2 sets of criteria that return true:

    More than 1 sports + sportscode 1

    1 sport

     

    The first set of of criteria means that if there are more than 1 sports in the view and they have sportscode 1 then it will show the sportcodes 1 and that sport.

    All sportcodes have sportcode 1 so if you select all you will see all sports. But also if you pick 2 sports it will show the sportcodes 1 of 2 sports that is because the formula is

    Countd(sport)>1. If the number of unique sports does not change you could also say Countd(sport)>6. Best option would be to make a single value list, then you could only pick 1 sport or all 7.

     

    The other criteria is 1 sport. So if 1 sport is selected it will show all sport codes (because it has not been defined he should select a certain spor code)

     

    The issue that now occurs is that if you have 2 filters as normal filters it will look at both filters at the same time, then he will find sport code = 1 at every sport, he doesnt care if it is 1 sport 2 sports or 7 sports. he finds sport code 1 so he will only show sportcode 1.

    To fix this part he added the sportfilter to context. This means that first the context filter will happen and then the rest. So he will first look if you have 1 sport or more. Then if it is 1 sport he will show all codes and if its more than 1 sport he will only show code 1.

0/9000