Forum Discussion

wneiton's avatar
wneiton
Resolver I
7 years ago
Solved

Sort by value

Hi dear,  I have three independent tables , that is, no relationships between them. Each table has a column and I created a bar graph with them and I want to order it by value.       Th...
  • Maddy99's avatar
    Maddy99
    7 years ago

    i hope this could help you visual.

    old situation:

    you have 4 separte measures

     

    create a separte table for the legend. 


     

     

     

     

     

     

     

     

     

    create a switch that combine your measure to the table. 

    it would look like this.switch =

    VAR Legend = SELECTEDVALUE(Table1[Column1])
    RETURN 
    SWITCH(TRUE();
        Legend = "Proposta2"; [Measure 2] ;
        Legend = "Proposta3"; [Measure 3];
        Legend = "Proposta4"; [Measure 4])

     

     

     

     

     

     

     

     

    Now you have 1 measure that you can sort. 

    choose you visual and i think you are done. 

     

     

     

     

     

     

     

     

     

    change your setting in the colors if you want every measure to be a differnt colour. 

     

  • wneiton's avatar
    wneiton
    7 years ago

    Yes Maddy99

     

    Thanks for help, I've slightly changed a dax formula.

     

    switch = SWITCH(Teste[Column1];"proposta1";[Media_Impacto1];"proposta2";[Media_Impacto2];"proposta3";[Media_Impacto3])

     

     

    Teste = Table Name 

    Media_Impacto = my measure from different tables (no relationships tables)