Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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 WHEN anama.ppcoll is null
THEN 0
ELSE
case when anama.ppcoll <> 0
then Vendite."Quantità"/ anama.ppcoll
else 0
end
END)
anama and Vendite are the TABLE, ppcoll and Quantità are the columns.
i tried to write this query on Power BI but i don't know if it's right:
Thanks!
Solved! Go to Solution.
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 _Result
If it answers your needs, please mark my reply as the solution
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 _Result
If it answers your needs, please mark my reply as the solution
Thank you a lot, i will try this solution!
User | Count |
---|---|
80 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
98 | |
89 | |
82 | |
61 |