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)

Super User

## Re: Measure to compute changes within same table

You are welcome.

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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

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

Top Kudoed Authors
Users Online
Currently online: 303 members 3,133 guests
Recent signins: