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.
I have two tables-
Table 1
“Id” “Values”
1 1
1 0
1 1
2 1
2 1
3 1
4 0
4 1
4 1
Table 2
Id Status
1 No
2 Yes
3 Yes
4 No
I need to add a column to Table 2, Status such that Status = Yes if all Values are 1, else “No”.
Can someone please help me out?
Solved! Go to Solution.
@Anonymous -
Does this work for you?
Column = VAR t1Rows = CALCULATE( COUNTROWS(Table1), FILTER( Table1, Table1[Id] = Table2[Id] ) ) VAR t1Count1 = CALCULATE( SUM(Table1[Values]), FILTER( Table1, Table1[Id] = Table2[Id] ) ) RETURN IF( t1Rows - t1Count1 = 0, "Yes", "No" )
Proud to be a Super User!
@Anonymous -
Does this work for you?
Column = VAR t1Rows = CALCULATE( COUNTROWS(Table1), FILTER( Table1, Table1[Id] = Table2[Id] ) ) VAR t1Count1 = CALCULATE( SUM(Table1[Values]), FILTER( Table1, Table1[Id] = Table2[Id] ) ) RETURN IF( t1Rows - t1Count1 = 0, "Yes", "No" )
Proud to be a Super User!
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |