Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Friends,
Sample table here. I need a average from Returns (Qty), Shipped (Qty)
Returns (Qty) : 3296
Shipped (Qty) : 18732408
Rate (%) : 0.21%
Rate (%) =If [Shipped (Qty)]=0 Then 0 Else 12 * [Returns (Qty)] / [Shipped (Qty)] + 0
Can we get average with if Condition like above formula.
Thanks in Advance
Solved! Go to Solution.
@harib - The DIVIDE function has 3 parameters - Numerator, Denominator and Alternate Result. You could create a measure like this:
Rate (%) = var num = SUM([Returns (Qty)]) * 12 var den = SUM([Shipped (Qty)]) return divide(num, den, 0)
Hope this helps,
Nathan
Hi @harib ,
We can also use the IF() function.
Rate (%) = IF ([Shipped (Qty)]=0 , 0 , 12 * DIVIDE([Returns (Qty)] ,[Shipped (Qty)] )+ 0)
Best Regards,
Teige
Hi @harib ,
We can also use the IF() function.
Rate (%) = IF ([Shipped (Qty)]=0 , 0 , 12 * DIVIDE([Returns (Qty)] ,[Shipped (Qty)] )+ 0)
Best Regards,
Teige
@harib - The DIVIDE function has 3 parameters - Numerator, Denominator and Alternate Result. You could create a measure like this:
Rate (%) = var num = SUM([Returns (Qty)]) * 12 var den = SUM([Shipped (Qty)]) return divide(num, den, 0)
Hope this helps,
Nathan
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
68 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |