Forum Discussion
Ahoyt145
Jun 14, 2021Copper Contributor
Pivot Table - Add Column to Calculate Percent Sold
I have a spreadsheet with all of my companies accounts in Sales Force from the past year, both sold and unsold organized by zip code. The main purpose of what I'm using this for is to help better di...
- Jun 15, 2021
Instead of using implicit measures you may add explicit DAX measures as
Sold:=CALCULATE(COUNTROWS(Range),Range[Sale Status]="Sold") Unsold:=CALCULATE(COUNTROWS(Range),Range[Sale Status]="Unsold") Total:=[Sold] + [Unsold]and use them in PivotTable
Ahoyt145
Jun 14, 2021Copper Contributor
SergeiBaklan Thank you so much, this is exactly what I'm looking for. Is there a way to organize the table like this though?
This is what I get using your DAX measure
SergeiBaklan
Jun 15, 2021Diamond Contributor
Instead of using implicit measures you may add explicit DAX measures as
Sold:=CALCULATE(COUNTROWS(Range),Range[Sale Status]="Sold")
Unsold:=CALCULATE(COUNTROWS(Range),Range[Sale Status]="Unsold")
Total:=[Sold] + [Unsold]
and use them in PivotTable
- Ahoyt145Jun 15, 2021Copper ContributorSergeiBaklan You are a genius, sir. Thank you!
One last question (maybe 2). I have very limited experience with creating pivot tables, so I apologize as this is all new to me.
How can I now sort this information? For example, I want to sort by Sold, % largest to smallest. Then I'd also like to eliminate any zip codes that have less than 10 total accounts.
Thanks again!- SergeiBaklanJun 15, 2021Diamond Contributor
Ahoyt145 , you are welcome.
To sort: select More sort options
and here
zip codes
If manually you may slicers on fields from source data and filter by them
If by parameters we shall to define it somewhere in the grid (e.g. in parameters table), add it to data model and modify measures using such parameters.
- Ahoyt145Jun 15, 2021Copper ContributorBeautiful! Thank you again