Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
HI Everyone,
Can anyone help me why it is showing worng average total when i compare to excell with power bi, if calculation is wrong please correct me.
Average Overdue Days_Column =
VAR A =
IF(
SALES_LEDGER_PAYMENTS_M3[Invoice Paid] IN {"No", "Partial"},
SALES_LEDGER_PAYMENTS_M3[Overdue Days],
IF(
SALES_LEDGER_PAYMENTS_M3[Invoice Paid] = "Yes but Overdue",
SALES_LEDGER_PAYMENTS_M3[Days between Due Date and Payment Date],
BLANK()
)
)
RETURN IF(ISBLANK(A), 0, A)
Based on above measure i am calculation Average like below
New Average OverdueDays =
CALCULATE(AVERAGEX(SALES_LEDGER_PAYMENTS_M3,SALES_LEDGER_PAYMENTS_M3[Average Overdue Days_Column]))
Solved! Go to Solution.
Hi @BalajiBuddha,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
Hi @BalajiBuddha,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
Hi @BalajiBuddha,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
Your Power BI “average total” is wrong because your logic is forcing blanks to 0, and AVERAGEX includes those zeros in the denominator. Use the below calculated column instead:
Average Overdue Days (Column) =
IF (
SALES_LEDGER_PAYMENTS_M3[Invoice Paid] IN { "No", "Partial" },
SALES_LEDGER_PAYMENTS_M3[Overdue Days],
IF (
SALES_LEDGER_PAYMENTS_M3[Invoice Paid] = "Yes but Overdue",
SALES_LEDGER_PAYMENTS_M3[Days between Due Date and Payment Date],
BLANK()
)
)
Then your average measure can simply be:
New Average OverdueDays =
AVERAGE ( SALES_LEDGER_PAYMENTS_M3[Average Overdue Days (Column)] )
Hello @BalajiBuddha
Try with measure approach
Average Overdue Days =
AVERAGEX (
SALES_LEDGER_PAYMENTS_M3,
SWITCH (
TRUE (),
SALES_LEDGER_PAYMENTS_M3[Invoice Paid] IN { "No", "Partial" },
SALES_LEDGER_PAYMENTS_M3[Overdue Days],
SALES_LEDGER_PAYMENTS_M3[Invoice Paid] = "Yes but Overdue",
SALES_LEDGER_PAYMENTS_M3[Days between Due Date and Payment Date],
BLANK ()
)
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 31 | |
| 28 | |
| 24 |