cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JustinDoh1
Continued Contributor
Continued Contributor

How to apply filter here

I have this measure (that I am trying to add more filter):

 

Skill Mix % Total =
Divide(
    sum(Table[Average1])
    ,  
    sum(Table[Ave Census])
)
 
I am trying to add another filter because I need to bring only certain location (FacilityCode = 850) out of all.
 
JustinDoh1_0-1671659667447.png

 

 

I tried this way, but it comes with this error "Too many arguments were passed tot he DIVIDE function. The maximum argument count for the function is 3". 

 

Skill Mix % Total 850=
Divide(
             (sum(   
                       Table[Average1]            
                      ),
                     filter(Table, Table[FacilityCode] = 850)
            ),  
           (sum(
                      Table[Ave Census]          
                   ),
                   filter(Table, Table[FacilityCode] = 850)
          )
)
 
How do I add a filter in this case?
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Did you forget to include CALCULATE?

 

Skill Mix % Total 850 =
DIVIDE (
    CALCULATE (
        SUM ( Table[Average1] ),
        FILTER ( Table, Table[FacilityCode] = 850 )
    ),
    CALCULATE (
        SUM ( Table[Ave Census] ),
        FILTER ( Table, Table[FacilityCode] = 850 )
    )
)

 

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

Did you forget to include CALCULATE?

 

Skill Mix % Total 850 =
DIVIDE (
    CALCULATE (
        SUM ( Table[Average1] ),
        FILTER ( Table, Table[FacilityCode] = 850 )
    ),
    CALCULATE (
        SUM ( Table[Ave Census] ),
        FILTER ( Table, Table[FacilityCode] = 850 )
    )
)

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors