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
dariorucci
Regular Visitor

Table visual with measure

Hi all,

 

I have two tables (Table1 and Table2) joined on the column "Gruppo". I have created a simple measure based on values of Table1 (this is just an example of a more complex case)

If I create a table visual to display the measure and fields from Table1 all works good (left table of last image), but if I add a field from Table2 something goes wrong (right table of last image). Is this a normal behaviour and is there a way to fix this? I tried to filter the table and removing records where Importo is null and that would work, but I'm wondering if there is a more correct solution in building the measure.

Thank you very much for your help!

 

 

1.jpg2.jpg3.jpg4.jpg

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @dariorucci ,

 

When you have relationship between tables with 1 to many, you should always use on your measures and visual the one side column of your relationship, this is because of the cross filter that is single sided in this type of relationships.

 

In this case your measure should be:

Measure = CALCULATE ( SUM(Table1[Importo]); ALL(Table2[Gruppo]))

On the table visual you should also add the Gruppo from the Table 2.

 

Regards,

MFelix


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 @dariorucci ,

 

When you have relationship between tables with 1 to many, you should always use on your measures and visual the one side column of your relationship, this is because of the cross filter that is single sided in this type of relationships.

 

In this case your measure should be:

Measure = CALCULATE ( SUM(Table1[Importo]); ALL(Table2[Gruppo]))

On the table visual you should also add the Gruppo from the Table 2.

 

Regards,

MFelix


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.