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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
e175429
Helper III
Helper III

Calculate with a filter on 2 fields

Hey All,

 

I would like to create a measure that shows me "how many of bytes are promoters"?

 

I created this measure:

BSS Promoter = COUNTX(FILTER(Cleaned, Cleaned[ID] = "Promoter"), Cleaned[Section.] = "bytes")

 

But that gives me a error.

 

Cleaned = table name

NPS = field

Section = field

 

So, how do I create a measure with a filter on 2 columns?

 

Thank you!

1 ACCEPTED SOLUTION
e175429
Helper III
Helper III

I figured it out. I had to put calculate first. 

 

so its:

 

BSS Promoter = CALCULATE(COUNTROWS(Cleaned),
                           FILTER(Cleaned, Cleaned[ID] = "Promoter"),
                           FILTER(cleaned, cleaned[Section.]="bytes"))

View solution in original post

3 REPLIES 3
e175429
Helper III
Helper III

I figured it out. I had to put calculate first. 

 

so its:

 

BSS Promoter = CALCULATE(COUNTROWS(Cleaned),
                           FILTER(Cleaned, Cleaned[ID] = "Promoter"),
                           FILTER(cleaned, cleaned[Section.]="bytes"))
FreemanZ
Super User
Super User

hi @e175429 

Try like:
BSS Promoter =
COUNTROWS(
    FILTER(
        Cleaned, 
        Cleaned[ID] = "Promoter"
            &&Cleaned[Section] = "bytes"
     )
)

When I try that, I get this error:

 

e175429_0-1681479806584.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.