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 DAY PER MONTH WITH A CONDITIONAL

Hi

Thanks for read me, i have a trouble, i need a add a column, that shows the max of the workday (column b) by month, but also have t condition working (columE).

 

thanks

 

CESARPULIDOGDL_1-1681446451271.png

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @CESARPULIDOGDL 

try like:

Column = 
MAXX(
    FILTER(
        TableName,
        FORMAT(TableName[Fecha], "yyyymm")=FORMAT(EARLIER(TableName[Fecha]), "yyyymm")
        &&TableName[IsWorkingday]="working"
    ),
    DAY(TableName[Fecha])
)

or

Column2 = 
MAXX(
    FILTER(
        TableName,
        EOMONTH(TableName[Fecha],0)=EOMONTH(EARLIER(TableName[Fecha]),0)
        &&TableName[IsWorkingday]="working"
    ),
    DAY(TableName[Fecha])
)

 

FreemanZ_3-1681468765499.png

it makes more sense to do with a measure.

View solution in original post

2 REPLIES 2

@FreemanZ  thank you, its works..

 

FreemanZ
Super User
Super User

hi @CESARPULIDOGDL 

try like:

Column = 
MAXX(
    FILTER(
        TableName,
        FORMAT(TableName[Fecha], "yyyymm")=FORMAT(EARLIER(TableName[Fecha]), "yyyymm")
        &&TableName[IsWorkingday]="working"
    ),
    DAY(TableName[Fecha])
)

or

Column2 = 
MAXX(
    FILTER(
        TableName,
        EOMONTH(TableName[Fecha],0)=EOMONTH(EARLIER(TableName[Fecha]),0)
        &&TableName[IsWorkingday]="working"
    ),
    DAY(TableName[Fecha])
)

 

FreemanZ_3-1681468765499.png

it makes more sense to do with a measure.

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.