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
ktt777
Helper V
Helper V

Relationship with blank value

I want to get a summary based on type of the items. And some items are blank will be calssified as "No data"

I want to use relationship in the example . I tried but blank data did not show up in the graph

 

Here is the link to the power bi file : https://1drv.ms/u/s!ApIDnMK2eKiFgRCgNLBdrSt3ue0q?e=dGzldn

 

Thanks, 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @ktt777 ,

 

Your problem is that the relationship is not matching you data on one side you have blank and on the other you have 0.

 

What you can do is create a new column on the Cost table with the following code:

 

 

Relationship = IF(ISBLANK(Cost[Item]); "0";Cost[Item])

 

 

Now make the relationship based on this column.

 

Just some good practices advices

  • Usage of many to many relationship is not the best option because of the way the data relates you can have results that are not the expected ones or confusing to the users
  • Using blank values to make realtionship between tables is disadvice because the calculations will be hidden (has you have) or misscalculated so be carefull, relationships should be based on columns with values and not blanks.

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @ktt777 ,

 

Your problem is that the relationship is not matching you data on one side you have blank and on the other you have 0.

 

What you can do is create a new column on the Cost table with the following code:

 

 

Relationship = IF(ISBLANK(Cost[Item]); "0";Cost[Item])

 

 

Now make the relationship based on this column.

 

Just some good practices advices

  • Usage of many to many relationship is not the best option because of the way the data relates you can have results that are not the expected ones or confusing to the users
  • Using blank values to make realtionship between tables is disadvice because the calculations will be hidden (has you have) or misscalculated so be carefull, relationships should be based on columns with values and not blanks.

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.