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! Learn more

Reply

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

newlearnpbi123_0-1702132107017.png

 

 

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

newlearnpbi123_1-1702132107020.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.

2 ACCEPTED SOLUTIONS
saurabhtd
Resolver II
Resolver II

@newlearnpbi123  You can create new column like

any date = DATE(YEAR('Calendar'[Month-Year]),MONTH('Calendar'[Month-Year]),1 )

Here we are creating new date column wheere year and month will ba taken from Year-Month column and Day will be 1. So they will be one date for each Month. You can keep Day as any other number between 0-28. 
saurabhtd_1-1702196840032.png

 

View solution in original post

Anonymous
Not applicable

Hi @newlearnpbi123 ,

You can try this way:
Here is my sample date:

vjunyantmsft_0-1702446474371.png

I use these DAXs below to create two new columns to extract year and month:

Year = YEAR('Table'[Date])
Month = MONTH('Table'[Date])

vjunyantmsft_1-1702446611960.png

Then I use this DAX to create a new table to achieve your purpose:

Slicer = 
SUMMARIZE(
    'Table',
    'Table'[Year],
    'Table'[Month],
    "slicer",
    MIN('Table'[Date])
)

vjunyantmsft_2-1702446697862.png


Best Regards,
Dino Tao
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 @newlearnpbi123 ,

You can try this way:
Here is my sample date:

vjunyantmsft_0-1702446474371.png

I use these DAXs below to create two new columns to extract year and month:

Year = YEAR('Table'[Date])
Month = MONTH('Table'[Date])

vjunyantmsft_1-1702446611960.png

Then I use this DAX to create a new table to achieve your purpose:

Slicer = 
SUMMARIZE(
    'Table',
    'Table'[Year],
    'Table'[Month],
    "slicer",
    MIN('Table'[Date])
)

vjunyantmsft_2-1702446697862.png


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



saurabhtd
Resolver II
Resolver II

@newlearnpbi123  You can create new column like

any date = DATE(YEAR('Calendar'[Month-Year]),MONTH('Calendar'[Month-Year]),1 )

Here we are creating new date column wheere year and month will ba taken from Year-Month column and Day will be 1. So they will be one date for each Month. You can keep Day as any other number between 0-28. 
saurabhtd_1-1702196840032.png

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.