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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
luisreyes
Frequent Visitor

How to filter with 2 condition in a measure

Hi,

 

Im trying to use CALCULATE with 2 filters: 

Measure= CALCULATE(SUM(Hoja2[Cantidad]),Hoja2[Tipo]="No Consumidos",Hoja2[Tipo]="Ligero No Consumido")
i want to filter by 2 types to sum (No Consumidos, Ligero No Consumido), 
 
I managed to graph with only 1 type but i need the 2 types, to make a graph like this:
 
luisreyes_0-1657827290738.png

 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @luisreyes ,

 

Please try:

Measure = 
CALCULATE(
    SUM('Hoja2'[Cantidad]),
        FILTER(
            'Hoja2',
            'Hoja2'[Tipo]="No Consumidos"
                ||'Hoja2'[Tipo]="Ligero No Consumido"
        )
)

or

Measure = 
CALCULATE(
    SUM('Hoja2'[Cantidad]),
        FILTER(
            'Hoja2',
            'Hoja2'[Tipo] IN {"No Consumidos","Ligero No Consumido"}       
        )
)

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @luisreyes ,

 

Please try:

Measure = 
CALCULATE(
    SUM('Hoja2'[Cantidad]),
        FILTER(
            'Hoja2',
            'Hoja2'[Tipo]="No Consumidos"
                ||'Hoja2'[Tipo]="Ligero No Consumido"
        )
)

or

Measure = 
CALCULATE(
    SUM('Hoja2'[Cantidad]),
        FILTER(
            'Hoja2',
            'Hoja2'[Tipo] IN {"No Consumidos","Ligero No Consumido"}       
        )
)

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

mariussve1
Super User
Super User

You should be able to filter multiple columns with CALCULATE().

 

Can you please look at this link for concept and get back if you still have any questions 🙂

https://www.sqlbi.com/articles/specifying-multiple-filter-conditions-in-calculate/

Br

Marius


Br
Marius
BI Fabrikken
www.bifabrikken.no

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors