Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have the measure (Testing Step 2 Cash Improvement ) that gives a wrong total, the total should be 684,507, but it is giving 691,141.
This the dax:
Solved! Go to Solution.
Hi @sabd80,
Here are some steps you can follow to troubleshoot the issue:
Here are my test data:
1.Create a measure
Testing Step 2 Cash Improvement =
ROUNDUP (
SUMX (
SUMMARIZE (
'Supplier Spend Analysis',
'Supplier Spend Analysis (2)'[3.Step 2 DPO Days Move Each Supplier]
),
3000000 * 'Supplier Spend Analysis (2)'[3.Step 2 DPO Days Move Each Supplier]
),
0
)
2.Final output
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Hi All,
apologies for the late reply I was on leave.
None of the above are working.
The measure that gives the worng total relies on othe measures as in below screenshot:
and below are the measures:
Total Spend (last 12 mth) =
CALCULATE( [Total Spend $],
FILTER (
ALL ( 'Calendar - Invoice Date'),
DATEDIFF (
'Calendar - Invoice Date'[Calendar Date],
TODAY (),
MONTH
) >= 1
&& DATEDIFF (
'Calendar - Invoice Date'[Calendar Date],
TODAY (),
MONTH
) <= 12
)
)
------------------------
Total Spend $ Yearly All Suppliers last 12 mths =
CALCULATE([Total Spend (last 12 mth)],ALLSELECTED(), ALL(Supplier))
the value= 773,041,452.71
-----------------------
1.Weighted Avg per Supplier last 12 mths =
DIVIDE([Total Spend (last 12 mth)], [Total Spend $ Yearly All Suppliers last 12 mths])
------------------------------------------
2.Step 2 Avg Days Payment Difference =
CALCULATE(
AVERAGE('Supplier Spend Analysis'[Step 2 Days Payment Difference]) ,
FILTER (
ALL ( 'Calendar - Invoice Date'[Calendar Date] ),
DATEDIFF (
'Calendar - Invoice Date'[Calendar Date],
TODAY (),
MONTH
) >= 1
&& DATEDIFF (
'Calendar - Invoice Date'[Calendar Date],
TODAY (),
MONTH
) <= 12
)
)
--------------------------------------
3.Step 2 DPO Days Move Each Supplier =
[1.Weighted Avg per Supplier last 12 mths] * [2.Step 2 Avg Days Payment Difference]
----------------------------------
4.Step 2 Cash Improvement =
3000000 * [3.Step 2 DPO Days Move Each Supplier]
-----------------------------------
Testing Step 2 Cash Improvement =
VAR NewTable=
SUMMARIZE('Supplier Spend Analysis', Supplier[Supplier Code Caption],"total",[4.Step 2 Cash Improvement])
RETURN
IF(HASONEVALUE(Supplier[Supplier Code Caption]),
[4.Step 2 Cash Improvement] ,SUMX(NewTable, [total])
)
also the data has been refreshed and it has different figures.
Hi @sabd80,
Here are some steps you can follow to troubleshoot the issue:
Here are my test data:
1.Create a measure
Testing Step 2 Cash Improvement =
ROUNDUP (
SUMX (
SUMMARIZE (
'Supplier Spend Analysis',
'Supplier Spend Analysis (2)'[3.Step 2 DPO Days Move Each Supplier]
),
3000000 * 'Supplier Spend Analysis (2)'[3.Step 2 DPO Days Move Each Supplier]
),
0
)
2.Final output
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
@sabd80 First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
@Greg_Deckler , your favourite topic 😃
Proud to be a Super User! |
|
Proud to be a Super User!
that did not work, the supplier code should be the same.
This should work -
maybe you can try
Proud to be a Super User!
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |