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! Request now

Reply
Analitika
Post Prodigy
Post Prodigy

Filtering in calculation in Power BI

Hello,

 

I would like to ask why filtering not working in my calculations? I used this measure:

Analitika_0-1655275815704.png

It was not in {"Skola tiekeju"} but I still see skola tiekjui values in visual. Why it happens?

9 REPLIES 9
Analitika
Post Prodigy
Post Prodigy

_Gauta, EUR = 
CALCULATE(
    [__Lik_Suma]
    ,FILTER(
        _APV,
        (CONTAINSSTRING([apyvarta.operacija],"Pajamavimas") && not [apyvarta.operacija] in {"Turto pajamavimas"}  && [apyvarta.operacija] not in {"Skola tiekėjui"})
        || CONTAINSSTRING([apyvarta.operacija],"Gauta")
        || CONTAINSSTRING([apyvarta.operacija],"Pradinis")

    )
)

Hello,

 

Why I still getting included if I filtered not in ("skola tiekejui"). I use not in. But still it is in visual. How to resolve this?

FarhanAhmed
Community Champion
Community Champion

Since you are using || {OR} operater in your filter context. therefore your condition getting True for {"Skola tiekeju"} in values of  Operacija .







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




So how to fix it because I need to exclude some data?

try Use not in  expression of  {"Skola tiekeju"} with both || conditions 

 

||( Operacija  && not in  {"Skola tiekeju"})

||( Operacija  && not in  {"Skola tiekeju"})







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Error:

Analitika_0-1655277274475.png

How to resolve this?

sorry it was a typo

 

can you please add same condition with your next two filter expression of Operacija  







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




can you please write you DAX code in text format here,







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




 

_Gauta, EUR = 
CALCULATE(
    [__Lik_Suma]
    ,FILTER(
        _APV,
        (CONTAINSSTRING([apyvarta.operacija],"Pajamavimas") && not [apyvarta.operacija] in {"Turto pajamavimas"}  || not [apyvarta.operacija] in {"Skola tiekėjui"}  )
        || CONTAINSSTRING([apyvarta.operacija],"Gauta")
        || CONTAINSSTRING([apyvarta.operacija],"Pradinis")

    )
)

This also not works for me.

_Gauta, EUR = 
CALCULATE(
    [__Lik_Suma]
    ,FILTER(
        _APV,
        (CONTAINSSTRING([apyvarta.operacija],"Pajamavimas") && not [apyvarta.operacija] in {"Turto pajamavimas"}  && [apyvarta.operacija] not in {"Skola tiekėjui"})
        || CONTAINSSTRING([apyvarta.operacija],"Gauta")
        || CONTAINSSTRING([apyvarta.operacija],"Pradinis")

    )
)

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