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

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
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.