Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello!
I used Number=countrows(filter(table1, event="sold"), I got a blank value.
However if I create a new table firstly Newtable=filter(table1, event="sold"), and then Number=countrows(Newtable), it works and gets the correct number. I can not understand this! could someone help me! Thanks!
Solved! Go to Solution.
Hi @Anonymous
Thanks for reaching out to us.
please try this measure,
Number = countrows(filter('Table', 'Table'[type]="sold"))
if you want to put it into table visual, please try this measure,
Measure = countrows(filter(ALL('Table'), 'Table'[type]="sold"))
If you are interested in the difference between the two, you can read the context
Context in DAX Formulas (microsoft.com)
Solved: contexts in power bi - Microsoft Power BI Community
Row Context and Filter Context in DAX - SQLBI
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Thanks for reaching out to us.
please try this measure,
Number = countrows(filter('Table', 'Table'[type]="sold"))
if you want to put it into table visual, please try this measure,
Measure = countrows(filter(ALL('Table'), 'Table'[type]="sold"))
If you are interested in the difference between the two, you can read the context
Context in DAX Formulas (microsoft.com)
Solved: contexts in power bi - Microsoft Power BI Community
Row Context and Filter Context in DAX - SQLBI
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Use Calculate(Countrows(Table1),filter(table1, event="sold"))
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 82 | |
| 66 | |
| 42 | |
| 27 | |
| 25 |