Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello guys,
I have a calendar table where I created with M.
I'm relating it to a table of activities, where I grouped it by week.
I've calculated the total value of activities I have in that time period by a DAX measure (let's consider 5000), I need to plot a linear descending line over the period from that value (5000) to 0.
I've managed to get close results, but it doesn't stay at 0. It either exceeds or is missing 1 period of time.
Here is the current table and the expected table:
| Year | Month | End of Week | Expected |
| 2021 | 6 | 05/jun/21 | |
| 2021 | 6 | 12/jun/21 | |
| 2021 | 6 | 19/jun/21 | |
| 2021 | 6 | 26/jun/21 | |
| 2021 | 7 | 03/jul/21 | |
| 2021 | 7 | 10/jul/21 | |
| 2021 | 7 | 17/jul/21 | |
| 2021 | 7 | 24/jul/21 | |
| 2021 | 7 | 31/jul/21 | |
| 2021 | 8 | 07/ago/21 | |
| 2021 | 8 | 14/ago/21 | |
| 2021 | 8 | 21/ago/21 | |
| 2021 | 8 | 28/ago/21 | |
| 2021 | 9 | 04/set/21 | |
| 2021 | 9 | 11/set/21 | |
| 2021 | 9 | 18/set/21 | |
| 2021 | 9 | 25/set/21 | |
| 2021 | 10 | 02/out/21 | |
| 2021 | 10 | 09/out/21 | |
| 2021 | 10 | 16/out/21 | |
| 2021 | 10 | 23/out/21 | |
| 2021 | 10 | 30/out/21 | |
| 2021 | 11 | 06/nov/21 | |
| 2021 | 11 | 13/nov/21 | |
| 2021 | 11 | 20/nov/21 | |
| 2021 | 11 | 27/nov/21 | |
| 2021 | 12 | 04/dez/21 | |
| 2021 | 12 | 11/dez/21 | |
| 2021 | 12 | 18/dez/21 | |
| 2021 | 12 | 25/dez/21 | |
| 2022 | 1 | 01/jan/22 | |
| 2022 | 1 | 08/jan/22 | |
| 2022 | 1 | 15/jan/22 | |
| 2022 | 1 | 22/jan/22 | |
| 2022 | 1 | 29/jan/22 | |
| 2022 | 2 | 05/fev/22 |
Table I need:
| Year | Month | End of Week | Expected |
| 2021 | 6 | 05/jun/21 | 5000 |
| 2021 | 6 | 12/jun/21 | 4857,143 |
| 2021 | 6 | 19/jun/21 | 4714,286 |
| 2021 | 6 | 26/jun/21 | 4571,429 |
| 2021 | 7 | 03/jul/21 | 4428,571 |
| 2021 | 7 | 10/jul/21 | 4285,714 |
| 2021 | 7 | 17/jul/21 | 4142,857 |
| 2021 | 7 | 24/jul/21 | 4000 |
| 2021 | 7 | 31/jul/21 | 3857,143 |
| 2021 | 8 | 07/ago/21 | 3714,286 |
| 2021 | 8 | 14/ago/21 | 3571,429 |
| 2021 | 8 | 21/ago/21 | 3428,571 |
| 2021 | 8 | 28/ago/21 | 3285,714 |
| 2021 | 9 | 04/set/21 | 3142,857 |
| 2021 | 9 | 11/set/21 | 3000 |
| 2021 | 9 | 18/set/21 | 2857,143 |
| 2021 | 9 | 25/set/21 | 2714,286 |
| 2021 | 10 | 02/out/21 | 2571,429 |
| 2021 | 10 | 09/out/21 | 2428,571 |
| 2021 | 10 | 16/out/21 | 2285,714 |
| 2021 | 10 | 23/out/21 | 2142,857 |
| 2021 | 10 | 30/out/21 | 2000 |
| 2021 | 11 | 06/nov/21 | 1857,143 |
| 2021 | 11 | 13/nov/21 | 1714,286 |
| 2021 | 11 | 20/nov/21 | 1571,429 |
| 2021 | 11 | 27/nov/21 | 1428,571 |
| 2021 | 12 | 04/dez/21 | 1285,714 |
| 2021 | 12 | 11/dez/21 | 1142,857 |
| 2021 | 12 | 18/dez/21 | 1000 |
| 2021 | 12 | 25/dez/21 | 857,1429 |
| 2022 | 1 | 01/jan/22 | 714,2857 |
| 2022 | 1 | 08/jan/22 | 571,4286 |
| 2022 | 1 | 15/jan/22 | 428,5714 |
| 2022 | 1 | 22/jan/22 | 285,7143 |
| 2022 | 1 | 29/jan/22 | 142,8571 |
| 2022 | 2 | 05/fev/22 | 0 |
It is recommended that I remove the decimal places from the visualization of the graph of the linear line. However, I will not round the value for the line to be straight down.
Solved! Go to Solution.
Hi @Dukezera ,
Test the below:
step1,create index :
Step 2,use the below dax to create a new column:
expect = round(5000-('Table'[Index]-1)*5000/35,3)
Output result:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @Dukezera ,
Test the below:
step1,create index :
Step 2,use the below dax to create a new column:
expect = round(5000-('Table'[Index]-1)*5000/35,3)
Output result:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
@Dukezera , assume you have value column for which you want this
Cumm Sales = CALCULATE(SUM(Table[Value]),filter(allselected(date),date[date] >=max(date[Date])))
@amitchandak I don't have a value column. I have the total amount (5000) calculated in DAX FORMULA. I want to do the EXPECTED Column with this value.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 109 | |
| 47 | |
| 30 | |
| 25 |