Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
VarshaTyagi_1
Partner - Contributor III
Partner - Contributor III

Ignore selections not working with Pick Match and If condition in a table

Hi Team,

We have been trying to bypass some filters in an expression but unfortunately it is not working as expected. We are using a table in which we have one dimension column and one measure column. In measure , we are bypassing 'Year','Quarter','Month' based on user selection for Value(i.e Year , Month , Quarter). The expression is as follows:


=(pick(Match(Only({<Month,Quarter,Year>}Value),'1','2','3'),

(avg({<[ Metric ID]={'10'},Month,Quarter,[Year Num] = {">=$(vCurrentYearStart)<=$(vCurrentYearEnd)"}>}[Yearly  Score])),

(avg({<[ Metric ID]={'10'},Year,Month,[Quarter Num] = {">=$(vCurrentQuarterStart)<=$(vCurrentQuarterEnd)"}>}[Quarterly Score])),

(avg({<[Metric ID]={'10'},Year,Quarter,[Month Num] = {">=$(vCurrentMonthStart)<=$(vCurrentMonthEnd)"}>}[Monthly  Score])))

Please let us know in case we are missing anything here.

Thanks in advance!

Labels (3)
7 Replies
tresesco
MVP
MVP

@VarshaTyagi_1 , most likely reason for this is  - the variables that you are using vCurrent... You should include all the set analysis bypass filters in those variables (aggregation functions being used in definitions there) as well.

VarshaTyagi_1
Partner - Contributor III
Partner - Contributor III
Author

Hi @tresesco , Thanks for your response!

I have tried bypassing filters in variables as well. But still not working.

tresesco
MVP
MVP

Okay, another possible issue could be date/year/quarter format issue. Please check these fields have numeric/dual values and the similar format outputs are coming from variables as well. If this too doesn't work, try to you share a qvw file with sample data that demonstrates the issue.

VarshaTyagi_1
Partner - Contributor III
Partner - Contributor III
Author

Hi @tresesco 

Please find the attached QVF file. Here in case we are selecting 'Period' as 'Quarterly and additionally tried to  select some Month value as well , Score(measure) is getting change which ideally it should not.

We have all 3 filters 'as always selected' due to some business requirement.

Kindly do let me know in case anything is not clear in sample QVF.

tresesco
MVP
MVP

I didn't find set filters in your variable definitions. 

tresesco_0-1686917296513.png

 

VarshaTyagi_1
Partner - Contributor III
Partner - Contributor III
Author

Hi @tresesco 

I have tried with set filters in variable definition as well. That didn't worked as well hence removed. You can also try by passing "Quarter" and "Month" in the variable definition it is not working.

tresesco
MVP
MVP

I am suspecting it could be because of your island table (Value field). Try using variable instead, that should do the job and improve performance as well.