Forum Discussion
Issues with SumX Function -- Table Totals Incorrect
Hi Greg,
Here is my current formula. I tested you suggested DAX query, but I had an error at the end referring to '__Result'
For clarification, I am recycling Weekly NetChange from another formula I have written
Here is what the measure looks like: WeeklyNetChange =sum('Weekly Sales'[Weekly Sales')
Here is a sample of my data. I have used a star schema linking my vendor ID to my calendar table. I recieve weekly reports I am looking to subtrack the current week sales to the previous week sales based on report date.
Additionally on the table I do not get the correct generated total for the Diff Current Year Weeks and Previous Year Week.
When formulating a similar table for MoM and YoY, the chart is able to filter and tally the correct totals.
Let me know if you would like more information.
Thank you for your time and clarification.
Kindly!
Hi powerbinovice01 ,
You can create another two new measure as below and put these new measures to replace the original measure
Measure 1 =
SUMX (
GROUPBY (
'Weekly Sales',
'Weekly Sales'[Weekly Report Date],
'Weekly Sales'[Vendor Name]
),
[Diff Between Weekly TW and LW]
)Measure 2 =
SUMX (
GROUPBY (
'Weekly Sales',
'Weekly Sales'[Weekly Report Date],
'Weekly Sales'[Vendor Name]
),
[Diff Weekly TYW and LYW]
)
In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
If the above one can't help you, please provide more raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards