Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need to Calculate the Running total for last 4 Quarters only. My Table shown below
Example 01: 2021Q1 = 2021Q1+2020Q4+2020Q3 + 2020Q2
Example 02: 2020Q4 = 2020Q4+2020Q3+2020Q2 + 2020Q1
In Genral, last one Year total I wanted to cummulate. How to do this?
Solved! Go to Solution.
Hi, @Anonymous
According to your description, you want to get the running total of the last four quarters, I think you can achieve this using calculated column, you can try these calculated columns:
Index =
RANKX('Table',[Year quater],,ASC,Dense)
Sum of capas due =
CALCULATE(
SUM('Table'[# of capas due]),
FILTER(ALLSELECTED('Table'),
[Index]<=EARLIER('Table'[Index])&&
[Index]>=EARLIER('Table'[Index])-3 ))
Sum of Due-Ontime =
CALCULATE(
SUM('Table'[# of Due-Ontime]),
FILTER(ALLSELECTED('Table'),
[Index]<=EARLIER('Table'[Index])&&
[Index]>=EARLIER('Table'[Index])-3 ))
Then you can get the output like this:
Then you can create a table chart and place it like this:
And you can get what you want.
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description, you want to get the running total of the last four quarters, I think you can achieve this using calculated column, you can try these calculated columns:
Index =
RANKX('Table',[Year quater],,ASC,Dense)
Sum of capas due =
CALCULATE(
SUM('Table'[# of capas due]),
FILTER(ALLSELECTED('Table'),
[Index]<=EARLIER('Table'[Index])&&
[Index]>=EARLIER('Table'[Index])-3 ))
Sum of Due-Ontime =
CALCULATE(
SUM('Table'[# of Due-Ontime]),
FILTER(ALLSELECTED('Table'),
[Index]<=EARLIER('Table'[Index])&&
[Index]>=EARLIER('Table'[Index])-3 ))
Then you can get the output like this:
Then you can create a table chart and place it like this:
And you can get what you want.
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank You so much....its working as expected😊
Hi, @Anonymous
Glad to hear that you have sloved this problem, would you like to mark my reply as a solution so that others can learn from it too?
Thanks in advance!😊
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Amit I dont have date column in the table to relate with date dimention, I have only Year and Quarter
@Anonymous , Create a rank on Year Qtr (Make sure Qtr in separate table,say date)
New column
Qtr Rank = RANKX(all('Date'),'Date'[Year Qtr],,ASC,Dense) //YYYYQ
Lst 4 Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]<=max('Date'[Qtr Rank]) &&
'Date'[Qtr Rank]>=max('Date'[Qtr Rank]) -4
))
if you have date
Rolling 4 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-4,QUARTER))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |