Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Power BI Community,
I am trying to write a dax column that calculates the COUNTROWS based on the categories in a different column. See the data at he end.
Column = (CALCULATE(COUNTROWS('tableName'),FILTER('tableName','tableName'[categories])))
name | categories | count |
c | blue | 10 |
y | blue | 10 |
y | blue | 10 |
v | blue | 10 |
i | blue | 10 |
o | blue | 10 |
r | blue | 10 |
f | blue | 10 |
a | blue | 10 |
t | blue | 10 |
r | orange | 9 |
f | orange | 9 |
a | orange | 9 |
t | orange | 9 |
g | orange | 9 |
c | orange | 9 |
y | orange | 9 |
y | orange | 9 |
v | orange | 9 |
a | red | 11 |
t | red | 11 |
g | red | 11 |
c | red | 11 |
y | red | 11 |
y | red | 11 |
v | red | 11 |
i | red | 11 |
o | red | 11 |
r | red | 11 |
f | red | 11 |
v | yellow | 10 |
i | yellow | 10 |
o | yellow | 10 |
r | yellow | 10 |
f | yellow | 10 |
a | yellow | 10 |
t | yellow | 10 |
g | yellow | 10 |
c | yellow | 10 |
y | yellow | 10 |
Solved! Go to Solution.
Hello @SriKandimalla ,
If I understand your issue, try this:
Countrows = CALCULATE(COUNTROWS(crow),ALLEXCEPT(crow,crow[categories]))
crow is my table name.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hello @SriKandimalla ,
If I understand your issue, try this:
Countrows = CALCULATE(COUNTROWS(crow),ALLEXCEPT(crow,crow[categories]))
crow is my table name.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |