Forum Discussion
Carlos_Gomez
Sep 28, 2019Copper Contributor
percentage of sales advance in pivot table
Hi, people! Yesterday I was trying to make a pivot table that shows "presales", "sales" and de % advance [wich means "sales/presales"]. To be clear, in my work we sell packages to the retail...
- Sep 28, 2019
If your data is like this
to create PivotTable as on the right
- add data to data model creating PivotTable
- add three measures to the data model, using PowerPivot or from right click menu on Table
Measures are
Sale:=CALCULATE(SUM(Table1[Amount]),Table1[Kind]="sale") Presale:=CALCULATE(SUM(Table1[Amount]),Table1[Kind]="presale") Sales %:=DIVIDE([Sale],[Presale])- add them to values of the PivotTable
- apply formatting and design as desired
Carlos_Gomez
Sep 28, 2019Copper Contributor
Thanks a lot, SergeiBaklan ! It worked perfectly, but, for those retailers who sold the total of presale the pivot table shows me in percentage 102,08% or 102,04% and, for those who sold 98% the pivot table shows as 100%, I mean, it has a difference of 2%, does this occurs because of my database or is just an adjustment I need to do in the pivot table?
SergeiBaklan
Sep 29, 2019Diamond Contributor
That's just the math, it's necessary to dig your actual data to understand why do you have 2% difference