Forum Discussion

sokatenaj's avatar
sokatenaj
Advocate II
8 years ago
Solved

Switch Function Issues

Hi Folks,   I need help and cannot seem to wrap my brain around some logic here and I'm on a time crunch. I think I've been staring at this too long.    I have 3 tables: Active Employees, Sales E...
  • v-caliao-msft's avatar
    8 years ago

    sokatenaj,

     

    From your picture, you have create relationships between Active table and others tables. So you could try the DAX below to create calculated table on Active table.

    % of Time =

    var AutoFromSalesEE = RELATED(Sales EEs'[Auto %])

    var AutoFromAllocation = RELATED(Sales EEs'[Auto %])

    Return Switch(
      True(),
      AutoFromSalesEE< 1, "Partial",
      AutoFromSalesEE = 1, "Full",
      AutoFromAllocation< 1, "Partial",
      AutoFromAllocation = 1, "Full",

     "TBD"
    )

     

    If this is not what you want, please provide us some sample data and elaborate your expected result. So that we can make further analsyis.

     

    Regards,

    Chalrie Liao