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

New Column in Report not getting required results

My data is a list of incoming deliveries from different cities.[Incoming]

My reference table has a list of Bays allocated to different cities.[Bay Allocation]

Many to one relationship.

My report has a list of the cities and the relevant Bay.

In report view I want add an extra column that puts "Not Allocated" where there is a blank bay.

Column = IF('Bay Allocation'[Bay]="","No Allocation",'Bay Allocation'[Bay])

However it is only returning a result where the Bay number already exists.

ellisellis_1-1653042095452.png

 

Is there a way of doing this or do I need to merge queries and do it that way?

Thanks for your patience and time in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you all for your help. I managed to figure it out.
I first needed to create a RELATED column in the DATA VIEW of the Incoming Table.

Allocated Bay 1 = RELATED('Bay Allocation'[Bay])
Then create my formula based on this:
Allocated Bay = if(Incoming[Allocated Bay 1]=BLANK(),"Not Allocated",Incoming[Allocated Bay 1])

Anybody got a good link to learn the top 20 DAX formulas?

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thank you all for your help. I managed to figure it out.
I first needed to create a RELATED column in the DATA VIEW of the Incoming Table.

Allocated Bay 1 = RELATED('Bay Allocation'[Bay])
Then create my formula based on this:
Allocated Bay = if(Incoming[Allocated Bay 1]=BLANK(),"Not Allocated",Incoming[Allocated Bay 1])

Anybody got a good link to learn the top 20 DAX formulas?
Whitewater100
Solution Sage
Solution Sage

Hi:

Are you showing a table you created on the canvas or the data table you want to add column too? If this is a data table

Result = IF('Bay Allocation'[Bay] = BLANK(), "No Allocation", 'Bay Allocation'[Bay])

 

I hope this works..

Hello:

 

That is great. Please consider giving kudos to my reply. Thanks.

amitchandak
Super User
Super User

@Anonymous , Try like

 

Column = IF('Bay Allocation'[Bay]="" || isblank('Bay Allocation'[Bay]) ,"No Allocation",'Bay Allocation'[Bay])

Anonymous
Not applicable

Hi amitchandsk
Thanks for the response. I get the same results! It's as though the formula is only looking at the Bay Allocation data as opposed to the entire table of data.

Index, City and Date are from the "Incoming" table and I've linked it to the "Bay Allocation" table (many to 1)

I can go and create a merge query but thought that this would be a simple excercise!

I'm clearly missing a fundamental part of how this works !

 

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.