Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello
I'm trying to create a Measure that counts only the rows in a table if one of the columns starts with the word "MAIN*".
What I currently have that isn't working is:
Solved! Go to Solution.
Try this measure:
Row Count =
CALCULATE ( COUNTROWS ( MyTable ), LEFT ( MyTable[Column], 4 ) = "MAIN" )
Proud to be a Super User!
Your solution is great, @DataInsights .Here I have another idea in mind, and I would like to share it for reference.
Please try the following dax:
Count Rows with MAIN = CALCULATE(
COUNTROWS('Table'),
IFERROR(SEARCH("MAIN", 'Table'[Column1], 1, 0) = 1, FALSE)
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your solution is great, @DataInsights .Here I have another idea in mind, and I would like to share it for reference.
Please try the following dax:
Count Rows with MAIN = CALCULATE(
COUNTROWS('Table'),
IFERROR(SEARCH("MAIN", 'Table'[Column1], 1, 0) = 1, FALSE)
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this measure:
Row Count =
CALCULATE ( COUNTROWS ( MyTable ), LEFT ( MyTable[Column], 4 ) = "MAIN" )
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.