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.
Dear all,
I'm trying to count the number of occurence of a value from column "Date" in a list of dates with a semicolon separator in another column "Column B" as below :
Date | Column B |
date1 | date1; date2;date3;date4;date5;date6; ,,,,, |
date2 | date1; date2;date3;date4;date5;date6; ,,,,, |
date3 | date1; date2;date3;date4;date5;date6; ,,,,, |
date4 | date1; date2;date3;date4;date5;date6; ,,,,, |
Can you help me with any ideas, please 🙏
Thank you in advanace for your help !
Regards,
Solved! Go to Solution.
Hello @Betty888,
I created this calculated column which uses two main variables
The first variable
Please let me know if this works, and accept it as a solution if it does. You are kudo is also much appreciated.
Hi, @Betty888
You can create a custom column and use the following M expression in PowerQuery. This formula splits the text in "Column B" by semicolon and counts the number of elements after splitting. It then adds one to the count result. If there is no data after the semicolon, we need to subtract one from it.
= List.Count(Text.Split([Column B], ";"))-1
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Betty888
You can create a custom column and use the following M expression in PowerQuery. This formula splits the text in "Column B" by semicolon and counts the number of elements after splitting. It then adds one to the count result. If there is no data after the semicolon, we need to subtract one from it.
= List.Count(Text.Split([Column B], ";"))-1
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a lot !
In fact, your suggested solution counts the number of items, but what I need is to count the number of occurence of value from column "Date" in "Column B".
Regards,
Hello @Betty888,
I created this calculated column which uses two main variables
The first variable
Please let me know if this works, and accept it as a solution if it does. You are kudo is also much appreciated.
Many thanks !
it works for my problem, many many thanks !
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 |
---|---|
22 | |
10 | |
10 | |
9 | |
7 |