Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not 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?

 

RoomBuilding NameHours available (No Duplicates)
Classroom 1Building 11280
Classroom 2Building 21280
Classroom 2Building 20
Classroom 2Building 20
Classroom 4Building 41280
Classroom 4Building 40
7 REPLIES 7
Anonymous
Not applicable

Why don't you just remove the duplicates from the table using Power Query?

Best
D
Anonymous
Not applicable

@Anonymous 

 

Each row is a booking, so I couldnt just remove unfortunately

camargos88
Community Champion
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



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not 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

@Anonymous 

 

How are you calculation the total for each combination ?

Can you explain your model ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Hi @camargos88 ,

 

I currently have the measure of:

 

Total Bookable Hours = CALCULATE(

    COUNT(vwDimDate[Date]),

    FILTER(vwDimDate,vwDimDate[WorkingDayFlag]=1)) * 10

 

This however, doesn't take into consideration that a room could be duplicated for its bookable hours.

Does that make sense?

 

Thanks

 

@Anonymous ,

 

I would try to rank the values using Power Query and test if it's the number 1 to assign the value..

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.