Forum Discussion

Arkhos94's avatar
Arkhos94
Icon for Helper IV rankHelper IV
5 years ago

all ? Need some help understanding it

I have a table on my report with a list of site :

CompanyNameID
   
   
   

 

A measure name "score" exist on this table calculating a score from 0 (bad) to 10 (best) based on 5 different other table connected to this one (through ID)

 

My use has some filter so he can filter all the pages of my report per company and/or site

 

Then I have a ranking measure (to have a ranking per site).

 

I want to build it using "all" so then the user filter a site the ranking is not affected.

For example, Site A (part of company 1) is the site n°10 global and the 2nd site of its company

I want the ranking of the site to always be 10, no matter if the user filter company 1 or only site A

 

First I tried simply using "all" has its description says it remove every filter on the selected table :

Site ranking = RANKX(all('Site List'[Name]),[Score])

But if I filter on company 1, site A ranking become 2. If I filter only on site A, it become 1 (logical has there is only 1 site)

 

Then I tried to add some more element to all ;

Site ranking = RANKX(all('Site List'[Name],'Site List'[Company],'Site List[ID],'Site List'[Name]),[Score])
Here the ranking of site A stay at 10 no matter if I filter on company 1 or only on site A. => It works great
 
My question is : why does it work when I put all('Site List'[Name],'Site List'[Company],'Site List[ID],'Site List'[Name]) and not when I simply put all('Site List'[Name]) in my formula ?
 
Thanks for any help

1 Reply

  • V-lianl-msft's avatar
    V-lianl-msft
    Icon for Community Support rankCommunity Support

    Be aware that DAX measure are based on row context so any given value from slicers, filters,variables, relationships and so on can influence your result.

    Based on your description, you may be able to create a calculated column to meet your needs.