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

How Can I filter a measure to filter in another table?

I have a Measure Named "Sum of Projected Yields"(Basically calculating the sum of Projected Yields) in a table called "Projected Yields". I have another Measure Named "Sum of Harvested Yields" in a table called "Harvest Yields". I want to subtract these measures( Sum of Harvested Yields - Sum of Projected Yields). As these measures are not in the same table it is giving me wrong values after subtracting.

Projected Yield

Fieldname Projected Yield

1 2.90

2 2.99

Harvest Yield

Fieldname Harvest Yield

2 3.43

3 8.56

So when I filter on "FieldName" the Measure "Sum of Harvested Yields" filters for eg, when I filter on Fieldname = 2 , the Sum of Harvested Yields measure shows value 3.43 however the Measure "Sum of Projected Yields" does not filter, it shows the sum of both values(i.e 2.90 + 2.99). I want it to show only for fieldname = 2.

Please help. Thanks in advance

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Anonymous 

 

You can create a new table Intermediate_table to union the Fieldname for Slicer, and then create relationships between the three tables like picture below.

 

Intermediate_table = UNION('Harvest Yield','Projected Yield')

 

3.png

 

 

 

 

 

 

 

 

Based on your created measures Sum of Harvested Yields , Sum of Projected Yields and Subtract ( [Sum of Harvested Yields] – [Sum of Projected Yields] ), Put them in Multi-row card visual. When choose Fieldname 2 in slicer, return the result showing picture below.

 

4.jpg

 

 

 

 

 

 

Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EX9ukcbgVDhJpJMeCPl-sssBxcbb0RkUgUU8lDJX4m9atQ?e=qqiIyC

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hey sorry I forgot to mention, both these tables don't have the same number of columns, therefore could not use Union function

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.