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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hide
Frequent Visitor

When applying a filter to the table, how can I apply a filter to "min(date)" as well?

When applying a filter to the table, how can I apply a filter to "min(date)" as well?

 

min(date) = CALCULATE(MIN('Data'[date]),ALL('Data'))

sample3.png

Click on another list to filter this table. How can I make it so that min(date) is also filtered?

I want to make it the minimum date after filtering.

Below is an image of what I want to do.

sample4.png

 

This kind of processing is easy with Tableau, but PowerBI is difficult.

1 ACCEPTED SOLUTION

You created a calculated column in place of a measure. 

mahenkj2_0-1686468318206.png

 

View solution in original post

10 REPLIES 10
mahenkj2
Solution Sage
Solution Sage

Hi @hide 

 

Use ALLSELECTED in place of ALL. 

 

min(date) = CALCULATE(MIN('Data'[date]),ALLSELECTED('Data'))

 

When use ALL, it removes/ignores all the filter and whole table is visible. Fine details of ALLSELECTED here:

 

https://learn.microsoft.com/en-us/dax/allselected-function-dax

 

'Removes context filters from columns and rows in the current query, while retaining all other context filters or explicit filters.'

mahenkj2_0-1686461507360.png

 

Hope it helps.

hide
Frequent Visitor

Thank you for being prompt. I tried it, but it didn't change.

pict1.png

Hi @hide 

 

You may have some other items on the report. Instead of whole table in ALLSELECTED, use only date column:

 

min(date) = CALCULATE(MIN('Data'[date]),ALLSELECTED('Data'[date]))
hide
Frequent Visitor

Thanks.

I get the error "Circular dependency detected".

pict2.png

Hi @hide 

 

Pls provide sample data with full context which can replicate the problem.

hide
Frequent Visitor

Sorry for the elementary question, but how do I upload the data?

hide
Frequent Visitor

sample_min(date)_filter.pbix

thank you. Can you check here?

You created a calculated column in place of a measure. 

mahenkj2_0-1686468318206.png

 

hide
Frequent Visitor

Thank you very much!!

It's made with a major.

The concept around here is difficult, but I will study. It was helpful!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.