Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How to RANK with DAX using a filter but interact with other visuals without filter?

 Hi there,

 

The following two imagaes have two visulas on them, to the left is a card and to the right is a graph.

 

The ranking on the card was calculated using the following formula:

 

Rank Highest = RANKX(ALLSELECTED(Initial_Table[Region]),[Fact Value],

,

DESC,

Dense

)

 

I then went to the filter plane ane where it had my 12 weeks and I filtered using my MAX week caluculation to get my ranking for the latest week.

However, when I then click on one of my facts, Boston for example, it filters it to just that one week.

 

 

I still want my graph to show me the data for Boston over the twelve weeks but want my ranking to be based on my latest week instead. Is there more complex DAX code I can apply here?

 

Thank you in advance,

 

Lauren.

 

3 Replies

  • Try to use all date in the measure used in the graph. so that, it does not take a filter of Graph. Or isfilter to control you measure on graph

     

     

  • v-lili6-msft's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity Support

    hi Anonymous 

    when you click on one of my facts, Boston, it likes you use a slicer to filter region is Boston, so it seems that Boston only has data for the week shows in the second visual, and you may need to add ALL([Region]) in your MAX week caluculation formula.

    If not your case, please share your sample pbix file for us have a test.

    You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

     

    Regards,

    Lin