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.
I have 15 payments and I need calcualte the average for non-zero payment.
Actually there are 10 non-zero payment and average =45895.35/10 =4589.535.
But when I used the formula as below. It counts 22 and give me aveage of 2086.15. Please help me what is wrong with it. Thanks.
Avg_NonZero_Payment_Amt = CALCULATE(AVERAGE(Measure]),FILTER(Measure,Measure[Payment_Amt]<>0))
CountRows = Calculate(countrows(Measure), FILTER (Measure,Measure[Payment_Amt]<>0))
Hi @JulietZhu,
Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.
Best Regards!
Dale
Average = CALCULATE(AVERAGE(Table1[Payment_Amt]),FILTER(Table1,Table1[Payment_Amt] <> 0))
Count = CALCULATE(COUNT(Table1[Payment_Amt]),FILTER(Table1,Table1[Payment_Amt] <> 0))
I
I used the same data provided by you and got correctly. Try the above steps again.
Hi @JulietZhu,
Try the following measure:
Avg_NonZero_Payment_Amt = CALCULATE ( AVERAGE ( [Measure] ), SUM ( Measure[Payment_Amt] ) <> 0 )
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix, I tried, but got syntax error.
--------------------------------------------------------------------------------------
Try the following measure:
Avg_NonZero_Payment_Amt = CALCULATE ( AVERAGE ( [Measure] ), SUM ( Measure[Payment_Amt] ) <> 0 )
Regards,
MFelix
Hi @JulietZhu,
Did you try the solution of @pxg08680?
Best Regards,
Dale
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |