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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

MAX value using other columns

Hey! 

I have a table that has 3 columns up to 17 (See column Ordem), but the actual data goes to most recent information (as of today, is Ordem 9, but monday will be Ordem 10).

Henrique_Quint_1-1719520384208.png

What I want is to return the most recent Ordem that HAVE data on it, but when I try to use max value, it only returns 17.

 

 

1 ACCEPTED SOLUTION
justinmartin
Microsoft Employee
Microsoft Employee

If base is the column you want to make sure there is data in, you can do something like this:

My Measure = 
CALCULATE (
    MAX ( 'Table'[Ordem] ),
    NOT ISBLANK ( 'Table'[Base] ) 
)

View solution in original post

2 REPLIES 2
justinmartin
Microsoft Employee
Microsoft Employee

If base is the column you want to make sure there is data in, you can do something like this:

My Measure = 
CALCULATE (
    MAX ( 'Table'[Ordem] ),
    NOT ISBLANK ( 'Table'[Base] ) 
)
Anonymous
Not applicable

Hi @Henrique_Quint 

 

Based on your needs, I have created the following table.

vjialongymsft_0-1719538653222.png

 

 

Then you can use the following Measure to get the result you want:

Measure = 
VAR select_date = SELECTEDVALUE('Table'[Date])
RETURN
MAXX(FILTER('Table','Table'[Date]<=select_date&&'Table'[Estado]<>BLANK()),'Table'[Ordem])

 

 

Result:

vjialongymsft_1-1719538783607.png

 

 

 

 

Best Regards,

Jayleny

 

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

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.