Forum Discussion

TheRockStarDBA's avatar
TheRockStarDBA
Frequent Visitor
9 years ago
Solved

Implement CASE statement just like TSQL in PowerBI

Hello,   Is there a way to implement below case statement as a measure or a new column in powerBI   Result = case when AVG_USER_ACTIVE < 10 and PercentUsage < 20.00 and Total > 180 then 1 else 0...
  • djeepy1's avatar
    9 years ago

    Maybe I haven't understood but uou can use a simple if :

     

      result = if AVG_USER_ACTIVE < 10 and PercentUsage < 20.00 and Total > 180 then 1 else 0

     

    And you can nest them :

     

      result = if 1=1 and 1<>2 then

                if 1<2 then 1 else 0

               else 0

     

    Use parenthesis to priorize and clarify.

     

    Jean-Pierre Riehl