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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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