The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
81 | |
63 | |
56 |
User | Count |
---|---|
248 | |
123 | |
111 | |
78 | |
74 |