The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello folks,
I am trying to create a measure and counts the number of instances a value shows up in a multi-select field. More specifically, i have a table with company names and one of the columns shows if they are present on amazon and other sites. Like in the screenshot below:
What would be the most efficient way to have a metric that counts the number of companies that have 100000000 in that column?
Thanks in advance!
Hi @lrsiqueira ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Flag =
IF(
CONTAINSSTRING(
MAX('Table'[new_selectedchannels]),"100000000")=TRUE(),1,0)
Measure =
COUNTX(
ALLSELECTED('Table'),[name])
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Liu Yang,
Thanks for the suggestion! I am trying to keep the whole process within one measure and avoid using external filters. I'll try to combine both steps into a single calculation.
Thanks again,
Luis
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |