Forum Discussion

goyalsa's avatar
goyalsa
Helper III
4 years ago
Solved

compare two table based on highest week

Hi,

 

Is there any way to calculate by taking the highest "Week forecast filled in" from the demand sample table and compare the customer in demand sample table with the customer in the order sample table, whether it is forecasted or not.  

 

https://1drv.ms/u/s!ApGsTx0zWYrbiVEd9SJ-0pqCNdHs?e=RrzavX 

 

Any help will be really appreciated.

 

Kind regards,

Sahil

  • goyalsa , the expected output is not clear.  Also you need a common week and country table

     

    measure you can use with common country

    M1 =

    sumx(values(Country[Country]), lastnonblankvalue(order[Loading week]), Count(Order[order]))

     

    M2=

    sumx(values(Country[Country]), lastnonblankvalue(Demandside[week forecating filled in]), Count(Demandside[Demand]))

5 Replies

  • goyalsa , the expected output is not clear.  Also you need a common week and country table

     

    measure you can use with common country

    M1 =

    sumx(values(Country[Country]), lastnonblankvalue(order[Loading week]), Count(Order[order]))

     

    M2=

    sumx(values(Country[Country]), lastnonblankvalue(Demandside[week forecating filled in]), Count(Demandside[Demand]))

    • goyalsa's avatar
      goyalsa
      Helper III

      Hi amitchandak,

       

      I am trying to compare the loading week, the hub from both tables and want the forecasted demand number in the order table.  

       

      So, I can figure out demand forecasted v/s order allocated for that week and from the hub.

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Community Support

    Hi goyalsa,

     

    Could you give an example or describe your expected output in an excel spreadsheet?

    If you still have some question, please don't hesitate to let me known.‌‌

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!