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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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