cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 KeyWeek numberQuarterly Forecast
A01184
A02154
B011135
C011251
A012107
B012326
B022181
C022393
A013247
A023385
B013395
C023113

 

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.

 

Appreciate your help here.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Measure to compute changes within same table

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

View solution in original post

5 REPLIES 5
Super User
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 KeyWeekValue
A011120
A012170
A01370
A014100
A02170
A022100
A023170
A024130

 

Outcome:

 

Primary KeyWeek 2Week 3Week 4
A0150-10030
A023070-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.

Thanks for your help.

Super User
Super User

Re: Measure to compute changes within same table

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

View solution in original post

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)
 
Thanks for your assistance here!
Super User
Super User

Re: Measure to compute changes within same table

You are welcome.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

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

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

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.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

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

Users Online
Currently online: 303 members 3,133 guests
Please welcome our newest community members: