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
swaggerboy69
Helper IV
Helper IV

Forecast Recoveries

Hi Team,

I need help forecasting recoveries in Power BI.

So we have different systems in our organization. See example below:

Systems.JPG

The screenshot above are the Cost of the systems. Below are the dates when the systems go live:

Systems 2.JPG

Given those systems cost and the Systems go live date.

I want to be able to forecast recoveries.

So for the Month of December, I want to have a recovery of $816 and for January, I'm going to get $425.

Can you suggest a Query that would show using a Card visual the recovery for "Next Month" and also a table that would show recoveries every month?

 

Thank you!

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @swaggerboy69 
Try codes as below:
1.Create a calendar table:
Calculated table:

Calendar = 
    ADDCOLUMNS(
        CALENDAR(DATE(2020,12,01),DATE(2021,1,31)),
        "YearMonthnumber", FORMAT ( [Date], "YYYY/MM" )
    )

create a sort column for "YearMonthnumber":

No.Month = RANKX('Calendar','Calendar'[YearMonthnumber],,ASC,Dense) 

2. using lookupvalue  to  find the corresponding systems cost( calculated column)

Recovey = LOOKUPVALUE(Systems[Cost],Systems[System],Cost[Systems])

3.create measure to calculate next month recovery:

Next month Recovey = 
VAR _nextmonth =
    CALCULATE ( MAX ( 'Calendar'[No.Month] ), 'Calendar'[Date] = TODAY () ) + 1
RETURN
    CALCULATE ( SUMX ( Cost, Cost[Recovey] ), 'Calendar'[No.Month] = _nextmonth )

The result will show as below:

49.png

Please check attached pbix file for more details.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @swaggerboy69 
Try codes as below:
1.Create a calendar table:
Calculated table:

Calendar = 
    ADDCOLUMNS(
        CALENDAR(DATE(2020,12,01),DATE(2021,1,31)),
        "YearMonthnumber", FORMAT ( [Date], "YYYY/MM" )
    )

create a sort column for "YearMonthnumber":

No.Month = RANKX('Calendar','Calendar'[YearMonthnumber],,ASC,Dense) 

2. using lookupvalue  to  find the corresponding systems cost( calculated column)

Recovey = LOOKUPVALUE(Systems[Cost],Systems[System],Cost[Systems])

3.create measure to calculate next month recovery:

Next month Recovey = 
VAR _nextmonth =
    CALCULATE ( MAX ( 'Calendar'[No.Month] ), 'Calendar'[Date] = TODAY () ) + 1
RETURN
    CALCULATE ( SUMX ( Cost, Cost[Recovey] ), 'Calendar'[No.Month] = _nextmonth )

The result will show as below:

49.png

Please check attached pbix file for more details.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

aj1973
Community Champion
Community Champion

Hi,

What are we missing here Team! where are those amounts 816 and 425 coming from? what is it that you call "Recovery"?

Can you elaborate more on this topic please!

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Those are the monthly recoveries. Or total systems for December and January.

I just need a query that would compute the total of systems per month. Using a column date

 

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.