Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am rying to calculate the number of times 3 different strings appear in a column.
This measure works for one value -> CountPunctuality = CALCULATE(COUNTROWS(OTIF),OTIF[Punctuality] = "On Time")
I need to also count the number of times 2 other strings appear in the same column. Tried using or , & but nothing's working.
Solved! Go to Solution.
@android1 You can either create Measures for EACH one - the same as before
Just change "On Time" - so you'll have 3 Measures
Or do as in the picture...
Create a Table => drag the column twice to the Values area => the second column change to Count
This is faster but you'll have more flexibility later on if you create the individual Measures
@android1 Try this...
CountPunctuality = COUNTROWS ( FILTER ( OTIF, OTIF[Punctuality] = "On Time" ) )
Hi Sean,
How do I add 2 more text values to this. I want to count the number of times 'On Time', 'Late', 'Early'
appears in the column.
Thanks
@android1 You can either create Measures for EACH one - the same as before
Just change "On Time" - so you'll have 3 Measures
Or do as in the picture...
Create a Table => drag the column twice to the Values area => the second column change to Count
This is faster but you'll have more flexibility later on if you create the individual Measures
That's great. Thanks for your help Sean.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
65 | |
64 | |
56 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |