Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |