Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance 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 |
---|---|
73 | |
70 | |
38 | |
24 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
41 | |
40 |