Forum Discussion

tgjones43's avatar
tgjones43
Icon for Helper IV rankHelper IV
7 years ago
Solved

DAX calculation depending on values in 3 columns

Hi all   I need to create a measure in DAX that multiplies the value in [Count] by a fixed number (not shown here) that is dependent on the values in 3 other columns. [Width] is a numeric column, w...
  • tex628's avatar
    tex628
    7 years ago
    Measure =
    VAR Width = IF(Selectedvalue([Width])<5;"A";"B")
    VAR Species = Selectedvalue([Species])
    VAR Age = Selectedvalue([Age])
    Return
    IF(
    Width = "A" &&
    Species = "A" &&
    Age = "A" ; 1 ;
    IF(
    Width = "A" &&
    Species = "A" &&
    Age = "B" ; 2 ;
    IF(
    Width = "A" &&
    Species = "B" &&
    Age = "B" ; 3 ;
    IF(
    Width = "B" &&
    Species = "B" &&
    Age = "B" ; 4 ;
    IF(
    Width = "B" &&
    Species = "B" &&
    Age = "A" ; 5 ;
    IF(
    Width = "B" &&
    Species = "A" &&
    Age = "A" ; 6 ;
    IF(
    Width = "B" &&
    Species = "A" &&
    Age = "B" ; 7 ;
    IF(
    Width = "A" &&
    Species = "B" &&
    Age = "A" ; 8 ; BLANK()
    ))))))))

    Replace the numeric values in red with your fixed values