Calculate one value against multiple values in different columns

I'm trying to find the min. the value between column 1 and a range of numbers in different columns.

For example, is the difference between column 1 and column 2 less than the value between columns 1 and 3? Any suggestions on how to do this?

Answers

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🔴

    @mHejl

    if it were me i would unpivot the data (Magic ETL) to collapse the values in columns 2, 3, and 4 into one column then do a windowed MIN function with the Rank and Window tile.


    If you don't want to restructure your data, you could see if Magic or Beast Modes have an implementation of the LEAST() function https://www.w3schools.com/sql/func_mysql_least.asp

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • @mHejl I think @jaeW_at_Onyx has a good suggestion for you. If that is not working out, it would be helpful if you showed some examples so that we can understand what your data looks like and what output you are trying to get to.


    ______________________________________________________________________________________________
    “There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
    ______________________________________________________________________________________________