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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Shane_lees
New Member

Trying to Divide Count of Filtered Value by Another Count of Filtered Value

So I have a table called Perf_Data and a column within which is Activity. Within activity is two distinct values - Sent and 1st IV. All the values in this column are text format.

I need to have a measure which divides the count of one, by the count of the other.

The bit I'm struggling with is the filtering by each individual value. My understanding is you would use {"Sent"} but I keep getting Syntax errors.

Below is as far as I've gotten, but I cannot get it to work. Can anybody help as I'm pretty much tearing my eyeballs out what I think should be simple but is just not coming together.

DIVIDE(COUNTA('Perf_Data'[Activity]{"1st IV"})), COUNTA('Perf_Data'[Activity]{"Sent"}))

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

My Measure =
VAR FirstIV =
    CALCULATE ( COUNTROWS ( 'Perf data' ), 'Perf data'[Activity] = "1st IV" )
VAR Sent =
    CALCULATE ( COUNTROWS ( 'Perf data' ), 'Perf data'[Activity] = "Sent" )
RETURN
    DIVIDE ( FirstIV, Sent )

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

My Measure =
VAR FirstIV =
    CALCULATE ( COUNTROWS ( 'Perf data' ), 'Perf data'[Activity] = "1st IV" )
VAR Sent =
    CALCULATE ( COUNTROWS ( 'Perf data' ), 'Perf data'[Activity] = "Sent" )
RETURN
    DIVIDE ( FirstIV, Sent )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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