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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Summarize (using it to match values from one table to another)

Hello, 

 

I thought my formula below was working, but upon closer inspection this morning I see that it is not.   Also, I always try and post screenshots but it seems that sometimes they don't show up when the post is posted, so hopefully they will.   

 

Very simply, the "Match Item" formula is supposed to be matching items from the Forecast table, to items in an Orders table.     The "Match" formula then looks at the Match Item column, and if an item from the Forecast table matches an Item from the Orders table it should show up in the Match Item column  (and will say "Forecasted - Ordered" which means it was forecasted, and it was ordered).  

 

The problem, is that some matching items show up...and some do not.   I can't determine any particular reason why.    For example, in the first screenshot you can see that item VR-2P-1-1-06-L7P-06-U-S  shows up in the Forecast table, but not in the  "Match Item" column  (but it should).    Likewise, in the other table, you can see that item SR-2X-I-1-00-W-BF  shows up in the Forecast table and shows up correctly under the match item column in the Orders table.  

 

Just trying to figure out why it shows up for some, and not others.  

 

The "items" are connected thru an inactive relationship.   

 

Match Item = CALCULATETABLE(SUMMARIZE(Forecasts,Forecasts[Item]),USERELATIONSHIP(Forecasts[Item],Sales_Orders_for_Charts[Item]))

 

Match =

IF (

   Sales_Orders_for_Charts[Match Item] <> BLANK(),

   "Forecasted - Ordered",

   IF (

       Sales_Orders_for_Charts[Match Item]

           = BLANK(),

       "Unforecasted-Ordered",""

   )

)

 

Forecast table (left)   Orders table (right)

 

matching items .png  

 

match items .png

 

model .png

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

As tested, the method below works on my side.

Create measures

Measure = CALCULATE(MAX(forecast[Item]),USERELATIONSHIP(forecast[Item],orders[item]))

Measure 2 = 
IF (
   [Measure]<> BLANK(),
   "Forecasted - Ordered",
       "Unforecasted-Ordered"
   )

Capture18.JPGCapture19.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hello
Is this problem dear?
If you are loved, could you kindly accept it as a solution to close this case and help the other members find it more quickly?
If not, please feel free to let me know.
Best regards
Maggie
v-juanli-msft
Community Support
Community Support

Hi 
Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case and help the other members find it more quickly?
If not, please feel free to let me know.
 
Best Regards
Maggie
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

As tested, the method below works on my side.

Create measures

Measure = CALCULATE(MAX(forecast[Item]),USERELATIONSHIP(forecast[Item],orders[item]))

Measure 2 = 
IF (
   [Measure]<> BLANK(),
   "Forecasted - Ordered",
       "Unforecasted-Ordered"
   )

Capture18.JPGCapture19.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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