Forum Discussion
TheRockStarDBA
9 years agoFrequent Visitor
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...
- 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
midhunjoy
9 years agoNew Member
Result = if(AVG_USER_ACTIVE < 10,if (PercentUsage < 20.00,if (Total > 180,1,0)),0)
Hope this helps
Thanks,
Midhun