Forum Discussion

Tito's avatar
Tito
Icon for Helper IV rankHelper IV
4 years ago
Solved

Rankx with Allselected

Hello everyone,
how can i get the number 3 in the map, if i select line 3 in the table.


I have to use the ALLSELECTED (not All) function here because I want more selections in the filter.


Thanks

  • Hi,

    Sorry that I could not find a way to fix the measure when having No-disconnected table for the slicer purpose.

    Please check the below picture and the attached pbix file.

    For now, I suggest having a dimension table and a slicer table like below. The dimension table still filters and has relationship with a fact table. And at the same time, there is one disconnected table that acts as a slicer on the report. 

     

7 Replies

  • Hi,

    I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

    I tried to create a sample pbix file like below, and I hope the below can provide you the way to find the solution for your data model.

     

     

    Ranking measure: =
    VAR _newtable =
        FILTER ( ALL ( Data ), [Wenn Gesamt:] <> BLANK () )
    RETURN
        IF (
            HASONEVALUE ( Data[Versicherer] ),
            IF (
                NOT ISBLANK ( [Wenn Gesamt:] ),
                RANKX ( _newtable, [Wenn Gesamt:],, ASC, DENSE )
            ),
            "Selecte one of lines from the table visualization"
        )
    
    • Tito's avatar
      Tito
      Icon for Helper IV rankHelper IV

      Thank you very much.
      doesn't have to be a relationship between " Slicer table" and "Data" ?

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi,

        Thank you for your message.

        If the relationship is there, the measure has to be written in a slightly different way.

         

  • Hi Jihwan_kim
    The problem has (currently) been resolved.

    Thank you very much

  • Hi,
    Thank you for your message.

    the relationship must exist in my data model.
    What should I change now in Measure, please?

    • Jihwan_Kim's avatar
      Jihwan_Kim
      Icon for Super User rankSuper User

      Hi,

      Sorry that I could not find a way to fix the measure when having No-disconnected table for the slicer purpose.

      Please check the below picture and the attached pbix file.

      For now, I suggest having a dimension table and a slicer table like below. The dimension table still filters and has relationship with a fact table. And at the same time, there is one disconnected table that acts as a slicer on the report. 

       

      • Tito's avatar
        Tito
        Icon for Helper IV rankHelper IV

        Hi Jihwan_kim

        Thank you for your help 👍