May 25 2021 03:29 AM
Good morning,
I am attaching an xls file that I built with macros and pivot table to the "Verify Maximum" sheet.
I have these 2 problems that I can't solve:
1) I had to compress the file because inexplicably it weighs 76 Mb and I don't understand why (it doesn't seem too complex)
2) The "Verification of ceilings" sheet contains a Pivot table that is generated through "table 3" located in the "Detail of ceilings" sheet. In the Pivot table I have created a column called "Deductible amount (calculated)" determined by a calculation that should reveal the minimum value of the values between the columns "Average of maximum spending limit", "Sum of Total IVATO limit (Annex A point 13 Ministerial Decree 6/8/2020) "and" Sum of total cost of VAT ". The strange thing is that in row 16 it is evident that the calculation returns the correct value, that is € 200 placed in the "Average of maximum spending limit" column, but row 9 does not respond correctly to the same calculation, in fact it does not report the value of 24,000 € always on the "Average of maximum spending limit" column, but the value of € 30,181,452 .... which is by no means the lowest. Why does this happen if the calculation is the same and is defined for the pivot column in the "Pivot table analysis" section and then "fields, elements and sets" under "calculated field" identified by the "Deductible amount" field?
May 25 2021 03:54 AM
Solution1) The "used range" of most of the sheets was far too large. I deleted the unused rows and columns, and now the workbook is only 302 KB - see attached.
2) This is too complicated for me to investigate, sorry.
May 25 2021 05:28 AM
@Hans Vogelaar grazie mille !! thank you very much
Punto 1 risolto - Point one solved :)
Another help for resolve point 2
Sep 23 2021 05:40 AM
@Hans Vogelaar how i can deleted the unused rows and columns? i tried but i was unsuccessful
Sep 23 2021 06:17 AM
Scroll down to the end of the data.
Select all rows from the first unused row down to the bottom of the worksheet.
On the home tab of the ribbon, select Delete > Delete Sheet Rows.
Scroll to the right to the end of the data.
Select all columns from the first unused column to the right edge of the worksheet.
On the home tab of the ribbon, select Delete > Delete Sheet Columns.
Repeat for each sheet.
Save, close and reopen the workbook.
Sep 27 2021 02:29 AM
Sep 27 2021 02:39 AM
I'd have to see the workbook.
Sep 27 2021 03:11 AM
Sep 27 2021 04:03 AM
It was difficult to get the attachment to download, but it eventually worked.
I performed the steps I described in my previous reply, then saved the workbook. It went from over 79 megabytes to 630 kilobytes: less than 1% of the original size...
Remark: cell AN430 on the Dettaglio Massimali sheet contains a circular reference: the formula contains SUMIF functions that refer to column AN itself.
Sep 27 2021 02:26 PM
As for the 2).
You added calculated field (aka another column to the table) which for each row calculates min value in 3 other columns. They are with red mark here
In PivotTable you aggregate this column by sum, which correctly returns 30,181.45 Occasionally it gives the same result as sum of Totale Costo.
For the next grouping
we have only one row to aggregate. Sum of it is equal average/min of first column.
I'm not sure what exactly you'd like to calculate. If min between totals for average and sums of other fields, that's if add data to data model and play with DAX measures using explicit measures for aggregation. Perhaps something like
Sum Totale limite IVATO:=SUM( Tabella3[Totale limite IVATO (All. A punto 13 DM 6/8/2020)] )
Sum Totale Costo:=SUM( Tabella3[Totale costo IVATO] )
Average limite spesa massimo:=AVERAGE( [limite spesa massimo] )
Sum Importo detraibile:=MIN( MIN( [Average limite spesa massimo], [Sum Totale Costo] ), [Sum of Totale limite IVATO (All. A punto 13 DM 6/8/2020)] )
Sep 28 2021 01:55 AM
May 25 2021 03:54 AM
Solution1) The "used range" of most of the sheets was far too large. I deleted the unused rows and columns, and now the workbook is only 302 KB - see attached.
2) This is too complicated for me to investigate, sorry.