Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Calculate closest to?..

Hello,   I am working with a suggested pricing model for quoting coupled with actual sales data. For each item, there are three suggested prices, we will call them Green, Yellow, and Red. I want to...
  • v-micsh-msft's avatar
    v-micsh-msft
    9 years ago

    Hi rynoh17,

    Yes, if month column didn't get single value, create another filter for the month:

    Mostrelated = if(ABS(Sheet1[Guidance Price]-Sheet1[Sell Price])= MinX(

                                                                        filter(Sheet1,

                                                                               And(Sheet1[Item]=earlier(Sheet1[Item]),

                                                                                        Sheet1[month]=earlier(Sheet1[Month])),

                                                                        ABS(Sheet1[Guidance Price]-Sheet1[Sell Price])

                                                                         ),

                    Sheet1[Guidance color])

    Check this out.

    If any further assistance needed, please feel free to post back.

    Regards