Forum Discussion

cuongle's avatar
cuongle
Icon for Advocate II rankAdvocate II
9 years ago

Cannot sort by measure based on another measure

I got stuck on how to sort by measure based on another measure. On my case I have 2 measures called: Savings and Spend.

 

 

In order to support bar chart:

 

 

Whenever end-users choose 'Sort by Saving' I would like to sort by Spend behind the scene. I know Power BI support function called 'Sort By Column' on modeling but it's disable if I choose measure `Saving`

 

 

Is there anyway to work around for this case?

 

Thanks a lot

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi cuongle,

     

    I think this function only works on columns.(if you try to expand the dropdown panel, you can only find the columns)

     

    Regards,

    Xiaoxin Sheng

    • cuongle's avatar
      cuongle
      Icon for Advocate II rankAdvocate II

      Thanks Anonymous, do you know is there any way to work around with this? I cannot use column as measure `Spend` and `Savings` is dynamically calculated based on the currency that user chooses.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi cuongle,

         

        Can you share some detail contents about this formulas and table structures? If these measures not the dynamic measure which changes by slicer, you can modify the formula to transform it to calculate column.


        Regards,

        Xiaoxin Sheng