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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.