Forum Discussion
Anonymous
2 years agoNot applicable
CASE SUM from SQL SERVER to Power BI
How to bring this query from SQL SERVER to Power BI. I have to bring this query to a measure in Power BI and I don' t understand how to arrasnge this one. Can you help me? SQL SERVER: sum(CASE WH...
- 2 years ago
Hello,
Try this:
Colli = VAR _Total = SUM(anama[ppcoll]) VAR _Quantity = SUM(vendite[quantita]) VAR _Result = SWITCH( TRUE(), ISBLANK(_Total), 0, _Total <> 0, DIVIDE(_Quantity, _Total), 0) RETURN _ResultIf it answers your needs, please mark my reply as the solution
Alex87
2 years agoSolution Sage
Hello,
Try this:
Colli =
VAR _Total = SUM(anama[ppcoll])
VAR _Quantity = SUM(vendite[quantita])
VAR _Result =
SWITCH(
TRUE(),
ISBLANK(_Total), 0,
_Total <> 0, DIVIDE(_Quantity, _Total),
0)
RETURN _ResultIf it answers your needs, please mark my reply as the solution
Anonymous
2 years agoNot applicable
Thank you a lot, i will try this solution!