Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 63 | |
| 55 | |
| 42 | |
| 41 | |
| 23 |
| User | Count |
|---|---|
| 171 | |
| 136 | |
| 119 | |
| 80 | |
| 54 |