Forum Discussion

Chrisblanc's avatar
Chrisblanc
Regular Visitor
7 years ago
Solved

Division with active filter

Hello everyone, 

 

I am currently struggling with what actually appears quite simple: 

As you can see on the screeshots below, I have different amounts distributed per category on a graph, and the corresponding figures written on two columns. 
To get a comparision, I unlinked the graph and the "GLOBAL"column so the value is not affected by the selection, while the "SELECTION" column display the filtered value. 
However, I would like to get the "SELECTION" value as a percentage of the Global. 

 

Global valuesFiltered values per selectionProblem is, if I create a measure like : 

Returns rate = SUM('Table_1'[Quantity orders])/SUM('Table_1'[Quantity orders])
 
Is there any way the nominator of the formula can be affected by the selection on the graph while the denominator remains as a global SUM ?
 
 
Thank you in advance for your help ! 
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hey,

     

    This should work.... normally.

    SUM('Table_1'[Quantity orders])/calculate(SUM('Table_1'[Quantity orders]);all(Table_1'[Global]))

     

    Let me know how it turned out / mark it as solved if it works for you.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey,

     

    This should work.... normally.

    SUM('Table_1'[Quantity orders])/calculate(SUM('Table_1'[Quantity orders]);all(Table_1'[Global]))

     

    Let me know how it turned out / mark it as solved if it works for you.