Forum Discussion
Count the number for each row
Hi,
I have a matrix table which shows the hours the staffs works for each day. In order to get the hours, I used the measure below:
Is there a way for me to create a measure to count the number of 0 for each row?
For example,
I want to create a measure to find the number of 0 for each row.
Thanks in advance, really appreciate if anyone can help me as i'm stuck on this for almost a day.
1 Reply
- AnonymousNot applicable
Hi Anonymous ,
According to your description, you want to find the number of metric values that are 0 based on some metric value.
First of all, seeing that there are 3 tables in your metric, and that I do not have access to the model structure of your tables and the relationships between them, it is difficult to implement your requirements.
I can offer the following suggestions for your requirements:
(1) First of all we can't add another corresponding value in that visual object, because our column header puts a field, and we need to implement this requirement, we need to create another visual object.
(2) We can use the SELECTEDVALUE () function to get the NAME field for each row, then create a virtual table to calculate our metric value, and then get the corresponding number according to the virtual table.If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.