Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to ignore a part of slicer?

Hi all,

 

I have seen a lot of topic and try a lot, but I don't know why it didn't work in my example.

My data :
ID     NAME  DATE    REGION

111AAA1AFRICA
111AAA2US
111AAA3US
111AAA4CHINA
111AAA5CHINA

 

And I select DATE between 3 and 5.

I want to ignore the REGION slicer to get REGION in max DATE.

For example:

I choose DATE = 3 to 5 and REGION = US, I want to get CHINA, because the REGION is CHINA when DATE = 5(max DATE).

I try below measure

Measure = CALCULATE(MIN(Table1[REGION]),ALL(Table1[REGION]))

But it didn't work, I can't use ALL function, because I have other slicers in my real data.

 

Please lead me what I need to do.

Thanks a lot.

Aiolos Zhao

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Fixed it using a new table which have same date values, then select new table dates and change measure defination.

View solution in original post

13 REPLIES 13
Ashish_Mathur
Super User
Super User

Hi,

I can solve this problem with the PowerPivot in Excel.  However, when i write the same DAX formula in PowerBI desktop, i get a different answer.  In Excel, i created 2 slicers - one for Date in which i selected 3,4 and 5 and another for Region in which i selected US.  I then wrote these 2 measures

Max date=CALCULATE(MAX(Data[Date]),ALL(Data[Region]))
Measure1=LOOKUPVALUE(Data[Region],Data[Date],[Max date])

The result of the Max date measure (see the Excel screenshot) is 5 and this is the correct answer.  5 is the maximum date irrespctive of the chosen region.  The result of Measure1 is correct i.e. China.  So the Excel solution works very well.

Surprisingly, the result of the Max Date measure in PowerBI desktop is 3 due to which measure1 return the wrong answer of US.

You may download my MS Excel solution from here.

Excel solution works very wellExcel solution works very wellMax date measure in PBI returns the wrong answer of 3Max date measure in PBI returns the wrong answer of 3


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur 

 

Thank you for guiding in this context.

 

I made one minor modification in the PBI solution, and it is working now.

 

MAx Date = CALCULATE(MAX(TableName[DATE ]),ALL(TableName))

 

@Anonymous 

 

Please download the pbix file here

 

Rgds,

Vivek

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You are welcome Vivek.  Your formula will always return 5 even if the date range chosen in the slicer is 2,3 and 4.  That is not the desired result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur , @vivran22 

 

Really thanks for reply,

yes, like Ashish said, I can not use all(tablename) or all(date), because when I select 2 to 4, it will return 5.

I don't know why all(region) is not working.

So I didn't find the solution for now, and I'm still trying....

 

Thanks.

Aiolos Zhao

Anonymous
Not applicable

Anyone knows how to solve this?

Anonymous
Not applicable

Anyone knows how to solve this?

Anonymous
Not applicable

Fixed it using a new table which have same date values, then select new table dates and change measure defination.

Anonymous
Not applicable

I think this is a basic function for BI tools, any help?

vivran22
Community Champion
Community Champion

HI,

It is not very clear from the example shared about the requirement. When you select date (from a date slicer) between 3 and 5, where did you select Region = 3?

Rgds,
Vivek

Anonymous
Not applicable

Hi @vivran22 ,

 

Really thanks for reply, that's my mistake, I have changed it to US, I choose REGION = US.

And I want to get CHINA.

 

Thanks.

Aiolos Zhao

Anonymous
Not applicable

any solution about this?

I really want to make it.

@Ashish_Mathur 

 

Will you be able to help?

 

Thanks,

Vivek

Anonymous
Not applicable

Anyone can help with this question?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors