Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a pivot table that looks like the following.
Sales manger and Sales Rep are the dimensions
Sales Dollars= Sum(Sales)
Days in Period=count(DISTINCT {<MonthID={"<=$(=(Max(MonthID)))"}>} ReportingDate)
Daily Sales=Sum(Sales)/(count(DISTINCT {<MonthID={"<=$(=(Max(MonthID)))"}>} ReportingDate) )
The problem I have here is with my calculation of Days in Period. The number of days in this period is 40, but because of the associative data model Steve smith only made sales on 34 of the 40 days so his days in period is only 34. I need the days in period column to be the same for each Sales Rep. (With the ability to make selections on dates which would change the number of days in period)
Can anyone help????
Sales Manager | Sales Rep | Sales Dollars | Days in Period | Daily Sales |
John Doe | Steve Smith | 100 | 34 | 3 |
Derek Jeter | 200 | 29 | 7 | |
Tom Brady | 300 | 30 | 10 | |
Jane Smith | Mike Trout | 400 | 6 | 67 |
Lebron James | 500 | 25 | 20 | |
Larry Bird | 600 | 40 | 15 | |
Steve Nash | 700 | 40 | 18 | |
David Ortiz | 800 | 35 | 23 |
This is what ended up working best for me.
=count(
DISTINCT {<MonthID={"<=$(=(Max(MonthID)))"},ReportingFacilityID=,AgeGroup=,FinancialClassID=,Account=,Zip=>} ReportingDate)
I added ever possible dimension that was able to be included in the pivot table and on the sheet the pivot table was on
which was the following (ReportingFacilityID=,AgeGroup=,FinancialClassID=,Account=,Zip=)
BUT omitted all date fields, which gave me the proper functionality.
May be this
Count(TOTAL <[Sales Manager]> DISTINCT {<MonthID={"<=$(=(Max(MonthID)))"}>} ReportingDate)
Sunny this is what I was looking for but to expand this problem a bit further. This pivot table is set up to let the user pick from a list of dimensions what id going to be displayed. When I change the dimensions to be
Sales Manager and MonthYear this logic does not work rather then days in timeframe being the the number of days in the month it shows number of days in entire year regardless of month.
Any ideas?
May be you will need to use Aggr() function to make this work
Sum({<MonthID={"<=$(=(Max(MonthID)))"}>}Aggr(Count(TOTAL <[Sales Manager]> DISTINCT {<MonthID={"<=$(=(Max(MonthID)))"}>} ReportingDate), ....))
I am not sure what all dimensions will be needed here, but you can try it out or share a sample to look at
Sunny,
you were supposed to be on a break
This is me on a break...
This is what ended up working best for me.
=count(
DISTINCT {<MonthID={"<=$(=(Max(MonthID)))"},ReportingFacilityID=,AgeGroup=,FinancialClassID=,Account=,Zip=>} ReportingDate)
I added ever possible dimension that was able to be included in the pivot table and on the sheet the pivot table was on
which was the following (ReportingFacilityID=,AgeGroup=,FinancialClassID=,Account=,Zip=)
BUT omitted all date fields, which gave me the proper functionality.