Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

Hi,

 

You may download my PBI file from here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

Your question is not clear.  Show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

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.

Hi,

 

You may download my PBI file from here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

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!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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