Forum Discussion

Ganesh1984's avatar
Ganesh1984
Frequent Visitor
5 years ago
Solved

Dax Puzzle

Why does the minimum price in the puzzle column of the Puzzle table indicate $5. Interestingly, if I replace $0 with $1 the answer will be $1. Is this a puzzle? 

 

 

  • Ganesh1984 ,

    And if you want to revamp your own mentioned DAX so just remove the Price column after ALLEXCEPT. Make it like below:

    Puzzle = CALCULATE(MIN('Table'[Price]),ALLEXCEPT('Table','Table'[Food]))
    So you'll get $0 in output.

4 Replies

  • Ganesh1984 , You are creating a column

     

    Try like for Min

    minx(filter(puzzle, [food] =earlier([food]) ),[price])

     

    For max

    maxx(filter(puzzle, [food] =earlier([food]) ),[price])

  • Ganesh1984 , that's wierd. 

     

    I tried the same DAX interestingly I'm getting different answer. 

     

     

    Regards, 

    Manikumar

     

    • Tahreem24's avatar
      Tahreem24
      Icon for Super User rankSuper User

      Ganesh1984 ,

      Try this DAX column:

      Puzzle = CALCULATE(MIN('Car Master'[Price]),ALL('Car Master'))
       
       
      • Tahreem24's avatar
        Tahreem24
        Icon for Super User rankSuper User

        Ganesh1984 ,

        And if you want to revamp your own mentioned DAX so just remove the Price column after ALLEXCEPT. Make it like below:

        Puzzle = CALCULATE(MIN('Table'[Price]),ALLEXCEPT('Table','Table'[Food]))
        So you'll get $0 in output.