The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone,
I need a filter to see the names which their number is greater than 1.
If the sum of the number is empty or equal to 1, then " empty or equal to 1" otherwise "greater than 1"
Raw data
ID | Name | Status | Group |
1 | William | Yes | A |
2 | William | No | B |
3 | William | Yes | C |
4 | Max | No | A |
5 | Max | Yes | C |
6 | Luca | Yes | D |
7 | Marvin | Yes | A |
8 | Marvin | No | B |
9 | Max | No | B |
10 | Max | Yes | D |
Result:
Name | # Yes | # No | Sum |
William | 2 | 1 | 3 |
Max | 2 | 2 | 4 |
Luca | 1 | 1 | |
Marvin | 1 | 1 | 2 |
Thank you
Tito
Solved! Go to Solution.
Hi @Tito
Assuming your definition of number is the count of records per name, create this calculated column.
Slicer Column =
VAR _CountPerName =
CALCULATE ( COUNTROWS ( 'table' ), ALLEXCEPT ( 'table', 'table'[name] ) )
RETURN
IF ( _CountPerName > 1, "greater than 1", "Empty or equal to 1" )
Hi @Tito
Assuming your definition of number is the count of records per name, create this calculated column.
Slicer Column =
VAR _CountPerName =
CALCULATE ( COUNTROWS ( 'table' ), ALLEXCEPT ( 'table', 'table'[name] ) )
RETURN
IF ( _CountPerName > 1, "greater than 1", "Empty or equal to 1" )
Hi @danextian ,
Thank you very much. I have adjusted your measure:
Slicer Column =
VAR _CountPerName =
CALCULATE ( DISTINCTCOUNT( 'table' ), ALLEXCEPT ( 'table', 'table'[name] ) )
RETURN
IF ( _CountPerName > 1, "greater than 1", "Empty or equal to 1" )
help