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
maycon_bb
New Member

Slow to get value most recent ignoring month of row date

Hi all, 

I have two tables, I need to get the most recent value and cod_in in the table (IN) ignoring month of data row table (Out)

 

maycon_bb_0-1720793493696.png

 

I'm currently using this measure:

VALUE_RECENT = VAR _date = EOMONTH(SELECTEDVALUE(OUT[DATE]),-1)
VAR _data = MAXX(FILTER('IN', 'IN'[DATE]<= _date),'IN'[DATE])
RETURN
 MAXX(FILTER('IN','IN'[DATE] = _data),'IN'[VALUE])

 

COD_IN_RECENT = VAR _date = EOMONTH(SELECTEDVALUE(OUT[DATE]),-1)
VAR _data = MAXX(FILTER('IN', 'IN'[DATE]<= _date),'IN'[DATE])
RETURN
 MAXX(FILTER('IN','IN'[DATE] = _data),'IN'[COD_IN])

 

 Result

maycon_bb_1-1720793549985.png

 

 

Does someone know a good alternative for this measure?

 

File exemple: Example.pbix

 

 

 

 

1 REPLY 1
Anonymous
Not applicable

Hi @maycon_bb 

 

I have a few questions about this post, please help provide more detail information for us to solve it effectively.

  1. I can’t download the Example.pbix file that you linked. Please re-upload if necessary and keep data privacy confidential.
  2. Did the two measures return the correct expected results? If so, you want to further optimize the performance of your measurements, do you?
  3. Please explain more about “ignoring month of data row table (Out)”, it is better to provide an example to demonstrate it.
  4. Why use many-to-many relationships? Normally we recommend using one-to-many relationships. You can refer to https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand#cardinal....

 

Best Regards,

Jarvis Tang

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

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.