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 August 31st. Request your voucher.
Hello community! I am trying to add/count only the number "1" in a column with multiple values (see example below).
I tried to filter by "1" since I only want to show the volume by Planner in a visual, but I got an error.
What is the best way to obtain this? Any help?
Planner | Attribute | Value |
Mary | Attendees | 1 |
Carmen | Vendor | Date |
Ashley | Vendor | 1 |
Bianca | Attendees | 1480 |
Adam | Location | Christina |
Carlos | Location | 1 |
Solved! Go to Solution.
Hi,
Ths measure will return 3 as the answer
Measure = calculate(countrows(Data),Data[Value]="1")
Hope this helps.
Hi,
Ths measure will return 3 as the answer
Measure = calculate(countrows(Data),Data[Value]="1")
Hope this helps.
Hello @Marcegon,
Since your Value column contains non-numeric values, you might need to create a calculated column first to convert non-numeric values, and then create a measure to count the 1s.
Value Numeric = IF(ISNUMBER('TableName'[Value]), 'TableName'[Value], BLANK())
Should you require any further assistance, please do not hesitate to reach out to me.
Thank you! For this particular case I ended up "converting the column to number, then replacing errors with "0", then filter by "1".
User | Count |
---|---|
80 | |
74 | |
41 | |
30 | |
28 |
User | Count |
---|---|
107 | |
96 | |
53 | |
47 | |
47 |