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: 
samp
Contributor III
Contributor III

Ignore all selections except 2 fields with set modifier

Hi, 

Can anyone help on below expression to Ignore all selections except 2 fields(Country and State) with set modifier.

Currently I tried with below expressions which are not working as expected.

Sum({1<Date = {"<=$(=Max(Date))"} ,      [Country]=p([Country]),[State]=p([State])> } Cases)

Sum({1<Date = {"<=$(=Max(Date))"}> *<[Country]=p([Country]),[State]=p([State])> } Cases)

Appreciate for your help.

Labels (2)
5 Replies
seematayade
Partner - Contributor
Partner - Contributor

Hi, 

If you want to remove selections, then you can simply exclude those fields from the set analysis as shown below:

Sum({<Date1={"<=$(=Max(Date1))"},Date1=, Year=>}Cases)

Regards,

Seema

lironbaram
Partner - Master III
Partner - Master III

hi 

this seems like something who should work

Sum({1<Date = {"<=$(=Max(Date))"} ,      [Country]=p([Country]),[State]=p([State])> } Cases)

did you check that the function for date return the result as the same format of your date field 

tresesco
MVP
MVP

I had a write-up on this  few years back. Check here: Ignore-all-selections-except-few-fields-using-Set-Analysis

samp
Contributor III
Contributor III
Author

Hi,

Date working fine, even the expression working fine, the  only issue is if I select any dimension associated to other fact table then the expression returning null.

samp
Contributor III
Contributor III
Author

Hi,

Here I have around 50 fields which I want to exclude and only  date,country and state fields  i should allow for selection and date should be max date as in my set analysis, the expression is working fine but only I can't exclude those 50 fields selections.