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
MCacc
Helper IV
Helper IV

Help with a max condition

Hello, 

 

I have a table with the following information

MCacc_0-1669291266764.png

 

The columns Code and Info are what I want to show in my visual

 

Quarter column corresponds to a field from a calendar table with which I create a relationship:

Fact Table N --> 1 Calendar Table

This quarter column from my calendar table is also a filter 

 

Then, what I'd like to achieve in my tablix in powerBI is this: 

MCacc_1-1669291457731.png

 

I want to show ONLY the row with the Max MONTH for each quarter selected. The filter is multiple selection

 

I tried both a calculated column with MAX and MAXX but it doesn't work.

 

Do you have any other ideas?

 

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MCacc ,

 

You could create a calculated column in table:

ismax = 
var max_date = MAXX(ALLEXCEPT('Table','Table'[QUARTER]),'Table'[MONTH])
return
IF('Table'[MONTH]=max_date,1,0)

vjaywmsft_1-1669951323780.png

Then add it to visual filter and set value = 1.

vjaywmsft_0-1669951298303.png

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MCacc ,

 

You could create a calculated column in table:

ismax = 
var max_date = MAXX(ALLEXCEPT('Table','Table'[QUARTER]),'Table'[MONTH])
return
IF('Table'[MONTH]=max_date,1,0)

vjaywmsft_1-1669951323780.png

Then add it to visual filter and set value = 1.

vjaywmsft_0-1669951298303.png

 

Best Regards,

Jay

NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @MCacc , I think below is the solution for you.

 

1. Create a summarize table in power bi , select the modelling tab and select the new table option.

NikhilChenna_0-1669294495879.png

 

Summarize_table=
SUMMARIZE(
    'table1',
    'table1'[QUARTER],
    "MaxMonth",MAX('table1'[MONTH]),
    "Maxcode",MAX('table1'[CODE]),
    "MaxInfo",MAX('table1'[INFO])
)
 
this will solve your issue.
 
Regards, 
Nikhil Chenna
 
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.