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.
Hi everyone
I've created the following measure to count the number of rows when specific columns are filtered, but it's not working. All columns are formatted as text (as I need to retain leading zeros) and I have tried COUNTROWS(), COUNTA() and COUNTAX(), but no joy. Any ideas greatly appreciated? 😊
Solved! Go to Solution.
Hi @gth ,
It is really helpful to answer if you could share sample data in text format with expected output. In the meantime you can try any of these code:-
5. in high-skilled employment 2017/1 =
COUNTROWS (
FILTER (
all_core_data,
all_core_data[XWRKHSKILL]
IN { "01" }
&& all_core_data[XACTIVITY]
IN { "01", "02", "03", "04", "05" }
&& all_core_data[year] = "2017/18"
)
)
or
5. in high-skilled employment 2017/1 =
CALCULATE (
COUNT (all_core_data[HUSID]),
FILTER (
all_core_data,
all_core_data[XWRKHSKILL]
IN { "01" }
&& all_core_data[XACTIVITY]
IN { "01", "02", "03", "04", "05" }
&& all_core_data[year] = "2017/18"
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi, @gth
May I ask if your problem has been solved? Is the above post helpful to you?
If it does, could you please mark the post which help as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.
It makes it easier to give you a solution.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi. Apologies for not doing that sooner...and thank you too for the useful advice - I'll remember that for next time. Thanks again
Hi @gth ,
It is really helpful to answer if you could share sample data in text format with expected output. In the meantime you can try any of these code:-
5. in high-skilled employment 2017/1 =
COUNTROWS (
FILTER (
all_core_data,
all_core_data[XWRKHSKILL]
IN { "01" }
&& all_core_data[XACTIVITY]
IN { "01", "02", "03", "04", "05" }
&& all_core_data[year] = "2017/18"
)
)
or
5. in high-skilled employment 2017/1 =
CALCULATE (
COUNT (all_core_data[HUSID]),
FILTER (
all_core_data,
all_core_data[XWRKHSKILL]
IN { "01" }
&& all_core_data[XACTIVITY]
IN { "01", "02", "03", "04", "05" }
&& all_core_data[year] = "2017/18"
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Samarth_18
Thanks so much for your reply and for your suggestions. I'll try and provide some sample data - apologies for not doing that initially...am very new to all this.
Thanks again
Hey @gth ,
th approach doesn't look wrong to me. But it's hard to say why it doesn't work without more information.
Can you share the file or create a sample file? That would make it easier to understand why it's not working in your case.
Best regards
Denis
Hey @selimovd
Thanks so much for your reply. I'll try and provide some sample data - apologies for not doing that initially...am very new to all this.
Thanks again
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |