March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I need to calculate the amount of time each value appears in a particular column. The issue I'm having is that some rows have multiple values. Here's an example:
Column 1 |
A |
B |
A B D |
C D B |
E F |
I'd like to use a dax that will calculate each time the value appears. So the count would show A =2, B =3, D =2
Thank you!
Solved! Go to Solution.
Hi, @Cezenwoko
Enter a new table 'Table2' as below:
Then try measure as below:
Result = CALCULATE(COUNTROWS('Table1'),CONTAINSSTRING('Table1'[Column 1],MAX(Table2[Column1])))
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I am wanting to have a colunm that counts the rows.
This is my data but the ID does not count from 1, 2 ,3 and so on so thought I would add a colum to have the correct count per line, hope that makes sense
Hello @Cezenwoko
Try creating a calculated column using the following DAX formula:
you're a dawg for this one thanks for bailing me out. This should be the real accepted solution
thank you very much for the solution 🙂
Thank you for your response!
I initially tried this DAX but the results come out as: A = 1, B =1, ABD = 1. As opposed to counting each value individually.
Hi, @Cezenwoko
Enter a new table 'Table2' as below:
Then try measure as below:
Result = CALCULATE(COUNTROWS('Table1'),CONTAINSSTRING('Table1'[Column 1],MAX(Table2[Column1])))
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you!
I was looking for a way to create this without making another table but it seems like that's impossible right now
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |