Babken Hakobyan
New Member
- Joined
- Aug 31, 2016
- Messages
- 3
[FONT="]Hello,[/FONT]
[FONT="]In PowerPivot I have the following measure: [/FONT]
[FONT="]Sold:=CALCULATE(COUNTA(Database[Status]),Database[Status]="SOLD",Database[Range Status]=1)[/FONT]
[FONT="]Based on that measure I created the following formula:[/FONT]
[FONT="]Sales Rank Score:=RANKX(ALLSELECTED(Database[Agent Name&ID]),[Sold],,ASC)*0.25. So basically i want to have the agents ranked and a relevant weight (in this case it's 25%) applied based on the "Sold" values. Then I create a PivotTable displaying agents in the row field and "Sales Rank Score" as values. I then create a slicer containing ZIP Codes. So now I sort the values in the PivotTable and then select the top ten agents. The scores automatically change and display ranks calculated just for those top 10 agents. Moreover, the RANKX function totally ignores what criteria lie in the "Sold" measure. Then a more strange thing happens: when I clear the top 10 filter, the scores are calculated for all ZIP codes and not just the one selected in the slicer. So my questions are the following:[/FONT]
[FONT="]1.How can I make the RANKX function ignore the top 10 filter in the PivotTable and calculate the ranks only based on the ZIP code selected in the slicer?[/FONT]
[FONT="]2. How can I make the RANKX function take into account the criteria in the "Sold" measure?[/FONT]
[FONT="]I hope I was clear enough. If not, please don't hesitate to ask.[/FONT]
[FONT="]Thank You in advance.[/FONT]
[FONT="]In PowerPivot I have the following measure: [/FONT]
[FONT="]Sold:=CALCULATE(COUNTA(Database[Status]),Database[Status]="SOLD",Database[Range Status]=1)[/FONT]
[FONT="]Based on that measure I created the following formula:[/FONT]
[FONT="]Sales Rank Score:=RANKX(ALLSELECTED(Database[Agent Name&ID]),[Sold],,ASC)*0.25. So basically i want to have the agents ranked and a relevant weight (in this case it's 25%) applied based on the "Sold" values. Then I create a PivotTable displaying agents in the row field and "Sales Rank Score" as values. I then create a slicer containing ZIP Codes. So now I sort the values in the PivotTable and then select the top ten agents. The scores automatically change and display ranks calculated just for those top 10 agents. Moreover, the RANKX function totally ignores what criteria lie in the "Sold" measure. Then a more strange thing happens: when I clear the top 10 filter, the scores are calculated for all ZIP codes and not just the one selected in the slicer. So my questions are the following:[/FONT]
[FONT="]1.How can I make the RANKX function ignore the top 10 filter in the PivotTable and calculate the ranks only based on the ZIP code selected in the slicer?[/FONT]
[FONT="]2. How can I make the RANKX function take into account the criteria in the "Sold" measure?[/FONT]
[FONT="]I hope I was clear enough. If not, please don't hesitate to ask.[/FONT]
[FONT="]Thank You in advance.[/FONT]