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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MagikJukas
Resolver III
Resolver III

Min Date selected

Hello,

I have the following simple table.

When selecting material D and Dates Feb, Mar, Apr, I wish the Measure to show Feb.

regardeless the material selected, I want to display the earliest date selected.

 

can you advice how to achieve it?

 

 

 

 

MagikJukas_0-1720014992724.png

regards

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MagikJukas ,

I create a table as you mentioned.

vyilongmsft_0-1720057829145.png

Then I create a new table.

Table 2 = ADDCOLUMNS(VALUES('Table'[Date]),"Month",FORMAT([Date],"mmm"))

vyilongmsft_1-1720057980713.png

Also I create a measure and get what you want.

Measure = 
VAR _MinDate =
    CALCULATE ( MIN ( 'Table 2'[Date] ), ALLSELECTED ( 'Table 2' ) )
RETURN
    CONCATENATEX ( FILTER ( 'Table 2', 'Table 2'[Date] = _MinDate ), [Month] )

vyilongmsft_2-1720058461612.png

vyilongmsft_3-1720058480754.png

 

 

 

Best Regards

Yilong Zhou

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @MagikJukas ,

I create a table as you mentioned.

vyilongmsft_0-1720057829145.png

Then I create a new table.

Table 2 = ADDCOLUMNS(VALUES('Table'[Date]),"Month",FORMAT([Date],"mmm"))

vyilongmsft_1-1720057980713.png

Also I create a measure and get what you want.

Measure = 
VAR _MinDate =
    CALCULATE ( MIN ( 'Table 2'[Date] ), ALLSELECTED ( 'Table 2' ) )
RETURN
    CONCATENATEX ( FILTER ( 'Table 2', 'Table 2'[Date] = _MinDate ), [Month] )

vyilongmsft_2-1720058461612.png

vyilongmsft_3-1720058480754.png

 

 

 

Best Regards

Yilong Zhou

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

thanks for your reply.

I see your strategy, you basically create a new field of dates linked to the dataset.

 

I was hoping to find simpler solution, like 

Calculate(Min(date),all(material),allselected(date))

 but I really struggle to understand hwo to fix it...

 

Anonymous
Not applicable

Hi @MagikJukas ,

I don't think my approach is difficult, on the contrary, it does what you do and is easy for you to understand.

The solution you mentioned can't be implemented, because in the basic Table, it will change as the Slicer changes. And there are two Slicers in this case, and there is a hierarchical relationship between them, which is not possible to implement with what you would call DAX code.

 

 

 

Best Regards

Yilong Zhou

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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