i need to build a formula that looks like this: (MAX(`Min Order Cards`) -`Min Order Cards`)

jkb
jkb Member

i need to build a formula that looks like this: (MAX(`Min Order Cards`) -`Min Order Cards`)

 

i think I need to add a field to the dataflow for the max number, and then I can use that new field in my beast mode;

this formula above doesn't work in beastmode

Comments

  • kshah008
    kshah008 Contributor

    Hi all,

     

    Can anybody help @jkb out?

    Thanks!

  • Gimli
    Gimli Contributor

    Hello @jkb,

    You are correct. This calculation will need to be done in a dataflow. 

    You should be able to do it in a SQL dataflow using the following query: 

    SELECT 

    (SELECT MAX(`Min Order Cards`) FROM input_dataset)
    -
    (SELECT MIN(`Min Order Cards`) FROM input_dataset)
    AS 'Difference'

    FROM input_dataset
    **Say “Thanks" by clicking the thumbs up in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"