Forum Discussion
calculate accumulations
- Anonymous3 years ago
Hi aidaamieira ,
Here are the steps you can follow:
1. Create calculated table.
2. Create measure.
Rank_measure = RANKX( ALL('Table'), CALCULATE(MAX('Table'[Date])),,ASC)Group_Rank = MINX( FILTER(ALL('Table'), 'Table'[Year]=MAX('Table'[Year])&&'Table'[Qu]=MAX('Table'[Qu])),[Rank_measure])Rank_True = RANKX( ALL('Table'),[Group_Rank],,ASC,Dense)Sum_True = SUMX( FILTER(ALLSELECTED('Table'), 'Table'[Date]<=MAX('Table'[Date])),[Value])3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi aidaamieira ,
Here are the steps you can follow:
1. Create calculated table.
2. Create measure.
Rank_measure =
RANKX(
ALL('Table'),
CALCULATE(MAX('Table'[Date])),,ASC)Group_Rank =
MINX(
FILTER(ALL('Table'),
'Table'[Year]=MAX('Table'[Year])&&'Table'[Qu]=MAX('Table'[Qu])),[Rank_measure])Rank_True =
RANKX(
ALL('Table'),[Group_Rank],,ASC,Dense)Sum_True =
SUMX(
FILTER(ALLSELECTED('Table'),
'Table'[Date]<=MAX('Table'[Date])),[Value])
3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
Thank you for your response.
I think the explanation I gave didn't quite capture what I intended.
To make it easier, here is an explanation with images.
The database I have is something like this:
And what I want to get is something like this:
The idea is to have the 4 filters (year, quarter, sector and company) with a single selection option for all except the company and add an option to the quarter filter that, when selected, gives the results for the accumulated year as I explained previously.
Is there any possibility?
Thanks in advance.