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.
I'm encountering a challenge with counting occurrences of specific values in a field. In a column named STRATEGY, I currently have the following DAX measure to count occurrences:
The provided DAX measure functions, however the count seems to consider only the first instance in each field and doesn't include subsequent values separated by a delimiter ("/"). For example, if a row has values "Value 1 / Value 2," the measure only counts "Value 1" and not "Value 2."
I've tried separating the values by the delimiter, but then thats a different formula which I couldn't work out. What's the best to approach so that I can count all the occurences of a value?
Thanks.
Solved! Go to Solution.
One option is to split the column into rows using Power Query: Split Column --> By Delimiter --> Split into Rows.
You can simplify the measure as follows:
STRATEGY_measure =
CALCULATE (
COUNTROWS ( MNES ),
MNES[STRATEGY]
IN { "Value 1", "Value 2", "Value 3", "Value 4", "Value 5", "Value 6" }
)
Proud to be a Super User!
One option is to split the column into rows using Power Query: Split Column --> By Delimiter --> Split into Rows.
You can simplify the measure as follows:
STRATEGY_measure =
CALCULATE (
COUNTROWS ( MNES ),
MNES[STRATEGY]
IN { "Value 1", "Value 2", "Value 3", "Value 4", "Value 5", "Value 6" }
)
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
81 | |
48 | |
37 | |
27 |
User | Count |
---|---|
185 | |
73 | |
73 | |
50 | |
42 |