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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
jtpiazzamn
Helper I
Helper I

retrieve value from date table based on date in current table

Date table has the following fields: (Date field lists each day in the year)

DateStart of Month 
1-1-20231-1-2023 
1-2-20231-1-2023 
3-1-20233-1-2023 

 

Members table has the following fields (has more but for the context of this)

Created dateMonth-Year 

1-10-2023

  

1-2-2023

  

3-1-2023

  

 

I want to add a column to the Members table (named:Month/Year) using the value in "Start of Month" value in the Date table which is equal to the "created date" value in the Members table. 

 

I know -probably basic but haven't used DAX in a while

 

Thanks!

Jim

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@jtpiazzamn Try:

Month/Year Column =
  VAR __CreateDate = [Created date]
  VAR __Result = MAXX(FILTER('Date',[Date] = __CreateDate), [Start of Month])
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

@jtpiazzamn Try:

Month/Year Column =
  VAR __CreateDate = [Created date]
  VAR __Result = MAXX(FILTER('Date',[Date] = __CreateDate), [Start of Month])
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you - I forgot to mention that the relationship between the Date Table and the Members Table is "inactive".

hi @jtpiazzamn 

Greg's code does not rely on relationship. what issue did you encounter?

When I first started with a table 

jtpiazzamn_2-1675656994564.png

 

I then changed it to a bar chart 

jtpiazzamn_3-1675657045206.png

Then it worked - odd. 

It appears to be ok. I thought it was relevant. 
I have another question though. When I go to use this column (formatted as Date), when using it in a chart, it reads it as a count only - can't display the value of the date in the column. 

jtpiazzamn_0-1675656571604.png

jtpiazzamn_1-1675656686437.png

 

I'm confused. 

Thank you for helping!

 

Jim

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.