Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
floxxy
New Member

How to create a Trend vs last Value without Date as basis

Hi there,

I am not sure how to solve this, any Idea would be highly appreciated.

 

In simple terms, my table looks like this:

And

StepRevenue
Step1112
Step2201
Step3213
Step4158
Step1124
Step4123

 

 

And the result should look like that and I don't know how to get the Trend vs. Previous Number calculated. 

 Sum of RevenueTrend vs. Previous Number
Step1236 
Step2201-15%
Step32136%
Step428132%
1 ACCEPTED SOLUTION

Hi,

 

You may download my solution from here.

 

Hope this helps.

 

Untitled.png


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

View solution in original post

5 REPLIES 5
vega
Resolver III
Resolver III

Is the first table your dataset?

 

If that is the dataset, the way I would approach would be the following:

 

  1. Create a new column stepNum that contains the number of the step
StepNum = 
VALUE(REPLACE(Table1[Step],1,4,""))
  1. The measure you need will be the following:
Tread vs. Previous Number = 
VAR num = SELECTEDVALUE(Table1[StepNum])
VAR answer = 
DIVIDE(
    [Sum of Revenue],
    CALCULATE(
        [Sum of Revenue],
         FILTER(
             ALL('Table1'),
             Table1[StepNum] = num-1
         )
    ),
    BLANK()
)
RETURN
IF(ISBLANK(answer), BLANK(), answer-1)

 

Thank you for the quick response. Maybe I was oversimplifying the case, will try to explain it better. Forget the "Step1" thing. I have two Tables.

"Calendar" with Date ( with active relationship to Date in the "Report_2017" Table)

"Report_2017" with lots of data, one column is "Spend EUR"

 

One colum in "Calender" is called "Week_ongoing" and this counts weeknumbers from 1 to XXX (not limited to 52 weeks so it goes over different years as well as continuos number)

 

Calendar

DateWeek_ongoing
01.01.20171
02.01.20171
03.01.20171
04.01.20171
05.01.20171
06.01.20171
07.01.20171
08.01.20172
09.01.20172
10.01.20172
31.12.201752
01.01.201853
09.01.201854

 

Report_2017

DateSpend EUR
30.12.2017110
31.12.2017126
01.01.2018201
09.01.2018100
10.01.2018113
16.01.2018281

 

 

The result schould look like before:

Week_ongoingSpend EURTrend vs. Previous Spend
56236 
57201-15%
582136%
5928132%

 

I get the first two columns obviousely simply in a table, but I don't get the right way to calculate the "Trend vs. Previous Spend"

 

Thank you again for your support!

Hi,

 

You may download my solution from here.

 

Hope this helps.

 

Untitled.png


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

Thank you! Could have found this solution by myself... Now that I see the solution it is obvous. Thank you!

You are welcome.


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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