Forum Discussion

Prihatama's avatar
Prihatama
Frequent Visitor
2 years ago
Solved

How to check minimum value for each item number

Hay everyone,

 

I have problem to find the oldest year for each item number. The table show like this.

So i want the result like expected value.

Please kindly help to solve this problem.

 

thank you

  • Hello Prihatama,

    If you want to write in your table. You need to create a new column. There are two option, Power Query side and dax side.
    I show the dax side(new column). You can use EARLIER function.

     

    Kind Regards,
    Gökberk Uzuntaş

    📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

    🔗 Stay Connected:
    📘 Medium |
    📺 YouTube |
    💼 LinkedIn |
    📷 Instagram |
    🐦 X |
    👽 Reddit |
    🌐 Website |
    🎵 TikTok |



6 Replies

  • Hello Prihatama,

    You can use dax calculation within ALLSELECTED. Here is the example:

     

    Kind Regards,
    Gökberk Uzuntaş

    📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

    🔗 Stay Connected:
    📘 Medium |
    📺 YouTube |
    💼 LinkedIn |
    📷 Instagram |
    🐦 X |
    👽 Reddit |
    🌐 Website |
    🎵 TikTok |

     
    • Prihatama's avatar
      Prihatama
      Frequent Visitor

      Hay uzuntasgokberk,

       

      thanks for your idea, that's greate.

      But could you give me another opinion. Because i want to write in the table.

      I have to combine with the others..

       

       

      • uzuntasgokberk's avatar
        uzuntasgokberk
        Super User

        Hello Prihatama,

        If you want to write in your table. You need to create a new column. There are two option, Power Query side and dax side.
        I show the dax side(new column). You can use EARLIER function.

         

        Kind Regards,
        Gökberk Uzuntaş

        📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

        🔗 Stay Connected:
        📘 Medium |
        📺 YouTube |
        💼 LinkedIn |
        📷 Instagram |
        🐦 X |
        👽 Reddit |
        🌐 Website |
        🎵 TikTok |



  • Hi Prihatama 

    Another solution with Power Query

     

    let
    Source = Your_Source,
    Group = Table.Group(Source, {"Item Number"},
    {{"Min", each List.Min([Year]), type number}, {"Year", each [Year], type list}}),
    Expand = Table.ExpandListColumn(Group, "Year"),
    Result = Table.AddColumn(Expand, "Expected value", each if [Min]=[Year] then "OK" else "NO")
    in
    Result

    Stéphane