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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Evanooruvan
Helper II
Helper II

How to get only one matching month and year of other date column

I have two date column,

one column has month-year and another column is weekend-dates, like below image

Evanooruvan_0-1702133018126.png

 

 

 

i want to have only one matching month and year of the month column, like below

Evanooruvan_1-1702133017858.png

 

 

 

the issue is starting of month and end of month sometimes present in previous month as highlighted in first image,

can someone help me get the result of 2nd image, any date is fine as long it is only one date matching the month column, so i could use it in  my slicer.

 

@grey  @FreemanZ @Jihwan_Kim  any help please. thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Evanooruvan 

You can refer to the following solution.

Sample data 

vxinruzhumsft_0-1702359841988.png

Create a measure

Measure =
VAR a =
    MINX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            EOMONTH ( [wk_end_dt], 0 ) = EOMONTH ( MAX ( 'Table'[Date] ), 0 )
        ),
        [wk_end_dt]
    )
RETURN
    IF ( MAX ( 'Table'[wk_end_dt] ) = a, 1, 0 )

Then put it to the visual filter.

vxinruzhumsft_1-1702359948183.png

Output

vxinruzhumsft_2-1702359960817.png

Best Regards!

Yolo Zhu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Evanooruvan 

You can refer to the following solution.

Sample data 

vxinruzhumsft_0-1702359841988.png

Create a measure

Measure =
VAR a =
    MINX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            EOMONTH ( [wk_end_dt], 0 ) = EOMONTH ( MAX ( 'Table'[Date] ), 0 )
        ),
        [wk_end_dt]
    )
RETURN
    IF ( MAX ( 'Table'[wk_end_dt] ) = a, 1, 0 )

Then put it to the visual filter.

vxinruzhumsft_1-1702359948183.png

Output

vxinruzhumsft_2-1702359960817.png

Best Regards!

Yolo Zhu

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

Ritaf1983
Super User
Super User

Hi @Evanooruvan 
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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