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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
e175429
Helper I
Helper I

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 I
Helper I

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 I
Helper I

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors