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
lucasneedhelp
Helper I
Helper I

Fill the blanks with last month's figure

Hi ALL,

 

I've been stuck here for 3 days and please help. Really appreciated!

 

This is my original sample data, and the final goal is to have a table of forecast amount by Endofmonth (Forecast Date) and by Dept Group. when there's a amount for the Dept Group in a particular month, use the amount. otherwise use last nonblankvalue. Dept Group add up all Res Code changes within the depart group

 

Event ID  Forecast Date Amount    Dept Group              Res Code

8322119/11/202134800Venue HireMECSPACERENT
832219/06/20220Venue HireMCCSPACERENT
832219/06/202250940Venue HireMECSPACERENT
832215/12/202233960Venue HireMECSPACERENT
8322113/01/2023300Event ServiceEVSVELECFORE
8322113/01/2023582.56Event ServiceEVSVECRFC
8322113/01/2023711.7Event ServiceEVSVBAYFORE
8322113/01/202370000CateringFBFORECASTS
8322116/01/20239677TSDAVFORECAST
832211/02/20234770Venue HireMCCSPACERENT
8322121/02/202310472TSDAVFORECAST
832214/05/20238697.36TSDAVFORECAST
832214/05/20238687.36TSDAVFORECAST
832214/05/20238022.36TSDAVFORECAST
8322122/05/20238867.36TSDAVFORECAST

 

And here's my desired results. it needs to list every month between first forecast month and last forecast month. 

 

Month YearCateringEvent ServiceTSDVenue Hire
Nov-2021   34800
Dec-2021   34800
Jan-2022   34800
Feb-2022   34800
Mar-2022   34800
Apr-2022   34800
May-2022   34800
Jun-2022   50940
Jul-2022   50940
Aug-2022   50940
Sep-2022   50940
Oct-2022   50940
Nov-2022   50940
Dec-2022   33960
Jan-2023700001594.26967733960
Feb-2023700001594.261047238730
Mar-2023700001594.261047238730
Apr-2023700001594.261047238730
May-2023700001594.268867.3638730

 

Could someone please help with Dax? Thank you so very much!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

See attached

 

lbendlin_0-1685922803344.png

 

View solution in original post

6 REPLIES 6
lbendlin
Super User
Super User

See attached

 

lbendlin_0-1685922803344.png

 

thanks heaps for your prompt assistance!!!

although it's a bit out from desired results.

the forecast change is attached to each resouce code.

There are two forecast change scenarios:
1. when same resouce changes, i'd like the result to replace last number. ie.) row 4 in the data sample
2.when a new resouce appears, i'd like the result to add new resouce forecast. ie.) row 10 in the data sample
therefore the final venue hire forecast is 38,730 (33,960+4,770)
the goal of this analyisis is to track forecast for each department at any point of time also to track final forecast amount

do you think it's possible? or are there too many variables?

I don't know what you refer to as row 4 or row 10.

 

Please provide sanitized sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

sample data remains the same

see expected results as below 

Month YearCateringEvent ServiceTSDVenue Hire
Nov-21          34,800
Dec-21          34,800
Jan-22          34,800
Feb-22          34,800
Mar-22          34,800
Apr-22          34,800
May-22          34,800
Jun-22          50,940
Jul-22          50,940
Aug-22          50,940
Sep-22          50,940
Oct-22          50,940
Nov-22          50,940
Dec-22          33,960
Jan-23       70,000            1,594   9,677       33,960
Feb-23       70,000            1,594 10,472       38,730
Mar-23       70,000            1,594 10,472       38,730
Apr-23       70,000            1,594 10,472       38,730
May-23       70,000            1,594   8,867       38,730

I'm sorry, that is too ambiguous for me. I also don't understand your expected result for May 2023.  It seems to me like you are mixing different concepts.

Maybe someone else can help you.  

Thank you for your help so far.

maybe it's too hard to achieve in Power BI. 

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.