Forum Discussion
Anonymous
6 years agoNot applicable
Check if row contains the same value
Hi,
Is there a way in Power BI/Dax to check if a row has matching values in two columns (Room & Building Name), and if it does and the total has already been worked out once for that room and building (1280). then enter 0 like in my example below?
| Room | Building Name | Hours available (No Duplicates) |
| Classroom 1 | Building 1 | 1280 |
| Classroom 2 | Building 2 | 1280 |
| Classroom 2 | Building 2 | 0 |
| Classroom 2 | Building 2 | 0 |
| Classroom 4 | Building 4 | 1280 |
| Classroom 4 | Building 4 | 0 |
7 Replies
- camargos88
Community Champion
Hi Anonymous ,
Is it possible to have a table without duplicated data and 1 column to identify the qtd os duplicated ?
So you can avoid it.
Ricardo
- AnonymousNot applicable
hi camargos88 ,
Unfortunately, its bookings data so the room and building will always have duplications as theres multiple bookings for that room.
Thanks
Liam
- camargos88
Community Champion
Anonymous
How are you calculation the total for each combination ?
Can you explain your model ?
Ricardo
- AnonymousNot applicableWhy don't you just remove the duplicates from the table using Power Query?
Best
D- AnonymousNot applicable
Anonymous
Each row is a booking, so I couldnt just remove unfortunately