Forum Discussion

Gikho's avatar
Gikho
Frequent Visitor
6 years ago
Solved

Running rate

Hello,
I'm trying to get the cumulative rate of a measure without succes.
I have 2 tables with both a week column, and the number of orders on a second column.

I created a measure to get a ratio per week

ratio = DIVIDE(SUM('table 1'[NbOrders]);SUM('table 2'[NbOrders]);0)
and then tried a running measure with the built in tools
Running ratio = 
CALCULATE(
	[ratio];
	FILTER(
		ALLSELECTED('Table 1'[Week]);
		ISONORAFTER('Table 1 '[week]; MAX('Table 1'[Week]); DESC)
	)
)
I alos tried different variation from other posts online wherre the Filter fucntion differ, but it doesn't work.
I ussualy come across the same numbers as my first measure.
How can i make this work?
Thanks.
  • Hi Gikho ,

     

    You could replace "ALLSELECTED('Table 1'[Week])" with "ALL('Table 1')" in your second measure.

    Here is the result.

     

2 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Gikho ,

     

    You could replace "ALLSELECTED('Table 1'[Week])" with "ALL('Table 1')" in your second measure.

    Here is the result.

     

    • Gikho's avatar
      Gikho
      Frequent Visitor

      Thanks you for the solution !

      I added a year column to have the running rate by year, but the results are indentical by year, is there a filter to add in the measure?