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
Syndicate_Admin
Administrator
Administrator

Filter for values ending in Zero

Dear.

I would appreciate your help in the following consultation:

I need to filter the values ending in three zeros for the following DAX formula:

Movimientos = CALCULATE(MIN(MB51_TODO[Fe.contab.]),

MB51_TODO[CMv]="101" || MB51_TODO[CMv]="501" ||

MB51_TODO[CMv]="201" || MB51_TODO[CMv]="202" ||

MB51_TODO[CMv]="221" || MB51_TODO[Ce.] ="1000")

I need a filter on the following argument:

MB51_TODO[Ce.] ="1000") Only values ending in "000" need to be filtered.

Also, if there were any ideas for reducing the length of my formula, I would appreciate it.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JMOLLAN ,

You can update the formula of the measure [Movimientos] as below:

Movimientos =
CALCULATE (
    MIN ( MB51_TODO[Fe.contab.] ),
    FILTER (
        MB51_TODO,
        MB51_TODO[CMv]
            IN { "101", "501", "201", "202", "221" }
                || RIGHT ( MB51_TODO[Ce.], 3 ) = "000"
    )
)

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @JMOLLAN ,

You can update the formula of the measure [Movimientos] as below:

Movimientos =
CALCULATE (
    MIN ( MB51_TODO[Fe.contab.] ),
    FILTER (
        MB51_TODO,
        MB51_TODO[CMv]
            IN { "101", "501", "201", "202", "221" }
                || RIGHT ( MB51_TODO[Ce.], 3 ) = "000"
    )
)

Best Regards

LQuedas
Resolver II
Resolver II

Hey @Syndicate_Admin ,

 

Can you try the RIGHT function to check the last 3 chars? e.g. 

RIGHT(MB51_TODO[Ce.],3)="000"

 

Movimientos = CALCULATE(MIN(MB51_TODO[Fe.contab.]),

MB51_TODO[CMv]="101" || MB51_TODO[CMv]="501" ||

MB51_TODO[CMv]="201" || MB51_TODO[CMv]="202" ||

MB51_TODO[CMv]="221" || RIGHT(MB51_TODO[Ce.],3)="000")

 

Cheers, LQ

 

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.