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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.