Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have the following code
Count =
IF (
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[First Name] ), "dummy" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[First Name] ), "regression" ) ||
LEFT ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[First Name] ), 4 ) = "test" ||
RIGHT ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[First Name] ), 4 ) = "test" ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[First Name] ), "condition" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[First Name] ), "invalid" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Full Name]), "dummy" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Full Name] ), "regression" ) ||
LEFT ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Full Name] ), 4 ) = "test" ||
RIGHT ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Full Name] ), 4 ) = "test" ||
CONTAINSSTRING ( 'FINLIVE - Contact Details (Email & Phone)'[Full Name], "condition" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Full Name] ), "invalid" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Email Address] ), "dummy" ) ||
CONTAINSSTRING ( LOWER ('FINLIVE - Contact Details (Email & Phone)'[Email Address] ), "regression" ) ||
LEFT ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Email Address] ), 4 ) = "test" ||
RIGHT ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Email Address] ), 4 ) = "test" ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Email Address] ), "condition" ) ||
CONTAINSSTRING ( LOWER ( 'FINLIVE - Contact Details (Email & Phone)'[Email Address] ), "invalid") ,
"Test Records",
"Clients"
)
You cant really have Column references in a measure without some aggregation. How coulkd I use this code in a measure?
Thanks
Solved! Go to Solution.
You could have it as a calculated column on the table (since I'm only seeing reference to that one table 'FINLIVE - Contact Details (Email & Phone)', and then have your measures be:
Total Test Records =
CALCULATE(
COUNTROWS('FINLIVE - Contact Details (Email & Phone)'),
'FINLIVE - Contact Details (Email & Phone)'[Count] = "Test Records"
)
And:
Total Clients =
CALCULATE(
COUNTROWS('FINLIVE - Contact Details (Email & Phone)'),
'FINLIVE - Contact Details (Email & Phone)'[Count] = "Clients"
)
You could have it as a calculated column on the table (since I'm only seeing reference to that one table 'FINLIVE - Contact Details (Email & Phone)', and then have your measures be:
Total Test Records =
CALCULATE(
COUNTROWS('FINLIVE - Contact Details (Email & Phone)'),
'FINLIVE - Contact Details (Email & Phone)'[Count] = "Test Records"
)
And:
Total Clients =
CALCULATE(
COUNTROWS('FINLIVE - Contact Details (Email & Phone)'),
'FINLIVE - Contact Details (Email & Phone)'[Count] = "Clients"
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |