cancel
Showing results for
Did you mean:

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.

Frequent Visitor

## Measure that creates an arithmetic progression of a value for as many rows as selected

Good afternoon, I am trying to recreate this table:

This is what I have so far

The Target on % to target is a value derived from a slider. I have calculated the first three columns, the one I am having a hard time calculating the highlighted one, the target by week. I have managed to get the value needed per week dividing the Target value by the number of rows shown which is the number of weeks like this:

But if I do it like this I would now need to sum the value of the previous row each time, or multply the number I got, in this case 115 by an incresing index for each week. I have tried many things and none have worked. Hopefully you guys can give me some ideas, thank you in advance.

2 REPLIES 2
Super User

@questionaskr , I think you need last wek values. For that in date or week table have week Rank column

new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format

Then you can measures like
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

Frequent Visitor

Thank you for your anwser, but I dont think it solves the problem, I am not looking for the weekly change, rather I am trying to create a column in that table to know how far off are we each week or reaching the target. This column should increase each week by the same amount, this amount is the quarterly goal divided by the number of weeks in the quarter and this goal is set by a slider so that it can be dynamically changed. So as stated, this new column is an arithmetic progression of Weekly Target Leads

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors