cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Measure to compute changes within same table

Hi All,

Would like to seek for some help here.

I have a series of weekly file with information similar to below table:

 Unique Key Week number Quarterly Forecast A01 1 84 A02 1 54 B01 1 135 C01 1 251 A01 2 107 B01 2 326 B02 2 181 C02 2 393 A01 3 247 A02 3 385 B01 3 395 C02 3 113

Can I create a measure to compute the difference of the same Primary (current week vs last week)?

For example, during week 4, what shown under Unique Key A01 will be the change from week 3 to week 4.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Hi,

Hope this helps.

5 REPLIES 5
Super User

## Re: Measure to compute changes within same table

Hi,

Your question is not clear.  Show the expected result.

Anonymous
Not applicable

## Re: Measure to compute changes within same table

Hi Ahish,

Thanks for replying. What I expected is:

Data Table (consists of series of weekly data)

 Primary Key Week Value A01 1 120 A01 2 170 A01 3 70 A01 4 100 A02 1 70 A02 2 100 A02 3 170 A02 4 130

Outcome:

 Primary Key Week 2 Week 3 Week 4 A01 50 -100 30 A02 30 70 -40

Week 2 = Difference in vallue for A01/A02 between Week 2 and Week 1 (Previous Week)

Week 3 = Difference in vallue for A01/A02 between Week 3 and Week 2 (Previous Week)

So I can plot either column chart or line chart to visualize the changes every week.

Super User

Hi,

Hope this helps.

Anonymous
Not applicable

## Re: Measure to compute changes within same table

Thanks Ashish! It defintely helps here!

The only change I made is the week formula:

Previous formula makes it repeating from 1 to 4.

Week = QUOTIENT(
DATEDIFF(DATE(YEAR('Calendar Date'[Date]),1,1),'Calendar Date'[Date], DAY) +1
,7)

Highlighted
Super User

## Re: Measure to compute changes within same table

You are welcome.

Announcements

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 429 members 4,216 guests
Recent signins: