The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have an issue where the total on a table visual is not adding correctly when a date range slicer is applied, but when export the table visual as a CSV the totals are correct ;
the total should be
£1,477,542.68
but as you can see the total in table is showing an additional £849,645.94 and i can't work out why.
The fields used are not measures or calculated columns there just the table data from an excel import. The figures do match though if you apply a different slicer say filtering by client it then adds up correctly.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
I'm unsure how to do this as the data set is huge and I don't think you'd get the same error if I use a sample set of it. All that table in the screenshot is doing is just SUMing the filtered data as described there are no measures or calculated columns being used, and the data doesn't match when you export a CSV report from Power.
The column working budget is just using a total and its this total that isn't matching when you add what data its actually filtering. The filter its using is from the same excel file that the figures are in.
Below is the data from the CSV export direct from PowerBi, but as I said the data set its filtering is huge.
Project Department | Working Budget | Sum of Final Accounts Invoice Value | Balance Outstanding | Project Completion Date |
Venue Finding | £517,502.37 | £476,221.58 | -£41,280.79 | 04/05/2023 00:00 |
Events | £323,112.62 | £234,460.35 | -£88,652.27 | 04/05/2023 00:00 |
Events | £252,365.46 | £145,000.00 | -£107,365.46 | 17/07/2023 00:00 |
Events | £130,776.99 | £121,595.24 | -£9,181.75 | 19/06/2023 00:00 |
Film | £114,286.79 | £114,286.78 | -£0.01 | 30/06/2023 00:00 |
Events | £72,114.54 | £68,798.04 | -£3,316.50 | 04/09/2023 00:00 |
Events | £43,460.90 | £43,460.88 | -£0.02 | 07/07/2023 00:00 |
Events | £7,832.60 | £7,832.50 | -£0.10 | 07/09/2023 00:00 |
Film | £7,715.29 | £7,715.00 | -£0.29 | 30/09/2023 00:00 |
Film | £3,583.47 | £1,950.00 | -£1,633.47 | 30/09/2023 00:00 |
Venue Finding | £2,216.00 | £2,212.50 | -£3.50 | 21/09/2023 00:00 |
Film | £1,265.00 | £0.00 | -£1,265.00 | 15/09/2023 00:00 |
Venue Finding | £904.25 | £873.45 | -£30.80 | 30/09/2023 00:00 |
Venue Finding | £406.40 | £0.00 | -£406.40 | 29/09/2023 00:00 |
Atlanta | £0.00 | £0.00 | £0.00 | 24/08/2023 00:00 |
£0.00 | £0.00 | £0.00 | 23/06/2023 00:00 | |
total | £1,477,542.68 |
I'm happy to upload my pbx file if that helps?
Your sample data displays fine. Are any of the fields based on measures?
What you can do in Power BI is look at the query for the visual .
this might be different from the query you run for the extract.
This is what the performance analyzer is showing the slicer is doing, i'm not 100% sure what i'm looking at.
// DAX Query
DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('DateTable'[Date])),
'DateTable'[Date] < DATE(2023, 10, 1)
)
VAR __DS0FilterTable2 =
TREATAS({"Balance Not Raised"}, 'SaleSheet'[Fully Invoiced])
VAR __DS0FilterTable3 =
TREATAS({"active",
"completed",
"reconciled",
BLANK()}, 'SaleSheet'[Project Status])
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL(
ROLLUPGROUP(
'SaleSheet'[Client],
'SaleSheet'[Project No/Name],
'SaleSheet'[Project - Project Owner],
'Accounts Key'[Account Lead],
'SaleSheet'[Project Department],
'SaleSheet'[Project Completion Date],
'SaleSheet'[Project Additional Notes],
'SaleSheet'[Fully Invoiced],
'SaleSheet'[InvoiceOutstanding]
), "IsGrandTotalRowTotal"
),
__DS0FilterTable,
__DS0FilterTable2,
__DS0FilterTable3,
"SumWorking_Budget", CALCULATE(SUM('SaleSheet'[Working Budget])),
"SumFinal_Accounts_Invoice_Value", CALCULATE(SUM('SaleSheet'[Final Accounts Invoice Value])),
"SumOutstanding_Invoice_Amount", CALCULATE(SUM('SaleSheet'[Outstanding Invoice Amount])),
"MaxColorID", IGNORE(CALCULATE(MAX('ColourID'[ColorID])))
)
VAR __DS0PrimaryWindowed =
TOPN(
502,
__DS0Core,
[IsGrandTotalRowTotal],
0,
[SumWorking_Budget],
0,
'SaleSheet'[Client],
1,
'SaleSheet'[Project No/Name],
1,
'SaleSheet'[Project - Project Owner],
1,
'Accounts Key'[Account Lead],
1,
'SaleSheet'[Project Department],
1,
'SaleSheet'[Project Completion Date],
1,
'SaleSheet'[Project Additional Notes],
1,
'SaleSheet'[Fully Invoiced],
1,
'SaleSheet'[InvoiceOutstanding],
1
)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
[IsGrandTotalRowTotal] DESC,
[SumWorking_Budget] DESC,
'SaleSheet'[Client],
'SaleSheet'[Project No/Name],
'SaleSheet'[Project - Project Owner],
'Accounts Key'[Account Lead],
'SaleSheet'[Project Department],
'SaleSheet'[Project Completion Date],
'SaleSheet'[Project Additional Notes],
'SaleSheet'[Fully Invoiced],
'SaleSheet'[InvoiceOutstanding]
Confirm that the three filters are present in both queries
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('DateTable'[Date])),
'DateTable'[Date] < DATE(2023, 10, 1)
)
VAR __DS0FilterTable2 =
TREATAS({"Balance Not Raised"}, 'SaleSheet'[Fully Invoiced])
VAR __DS0FilterTable3 =
TREATAS({"active",
"completed",
"reconciled",
BLANK()}, 'SaleSheet'[Project Status])
that still doesn't explain that why when it filters the results left don't add up correctly in the total, but when you manually add up the numbers using a calculater they are different to what the the total in the SUM is showing?
I'll have a look at that, none of the fields summing are measures they're just straight data, i think the sample would work fine as its not using the slicer filter, i'd have to share my pbx file i think for it show the error. i'm using a date range slicer to filter it down and it just doesn't add to the same amount.
User | Count |
---|---|
70 | |
67 | |
63 | |
50 | |
28 |
User | Count |
---|---|
113 | |
77 | |
65 | |
55 | |
43 |