The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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"}))
Solved! Go to Solution.
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 )
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 )
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
10 | |
7 |