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

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.

Reply
SophRow
Resolver II
Resolver II

Comparing identical values in columns but detected as different

Hi,

 

I am looking at project allocation to make sure my team aren't over or under allocated. To do this I'm comparing values from one column to another in the same table using the following formula:

 

Allocation = SWITCH(TRUE,('FTE compare'[Project FTE]='FTE compare'[TGI FTE]), "Allocation match", ('FTE compare'[Project FTE]>'FTE compare'[TGI FTE]), "Over allocated", ('FTE compare'[Project FTE]<'FTE compare'[TGI FTE]), "Under allocated")
 
Whilst it work on most of the rows, some with identical values are coming out as "Over allocated".
 
See here:
 
SophRow_0-1647979663861.png

Any help would be greatly appreciated!

 

Thanks, 

Soph

1 ACCEPTED SOLUTION
truptis
Community Champion
Community Champion

@SophRow -> just check if both the columns are of same data type and both of them have same no. Of decimal places and there is no rounding up of numbers.

View solution in original post

4 REPLIES 4
truptis
Community Champion
Community Champion

@SophRow -> just check if both the columns are of same data type and both of them have same no. Of decimal places and there is no rounding up of numbers.

Thanks @truptis I converted the data type to text and it worked!

truptis
Community Champion
Community Champion

@SophRow , Try using this:

Result= if([Project FTE]==[TGI FTE], "Allocation matched", if([Project FTE] > [TGI FTE], "Over alloted", "under alloted"))

 

@SophRow -> please mark this as a solution and hit the thumbs up if it helps you. Thank you.

Thanks @truptis 

 

I get exactly the same result, i.e. it's still calling two identical values different. I've even been back to the source data and re entered it, and tried a new Power BI file....

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.