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
whereismydata
Resolver IV
Resolver IV

Actuals and forecast value in one measure

Hi 🙂

 

I'm looking for a solution to display actuals and forecast values in one measure/column. I then want to display this measure/column in a linechart (x axis = Date; y= Value).

All I have are the actual values with a timestamp, what I want is to calculate an average value multiplied by an parameter (which will be a slicer, so the viewer can adjust the increase)

 

ValueDate
Source
102019-09-02
Actual
202019-09-03
Actual
172019-09-04Forecast
172019-09-04Forecast
.........
172019-12-31Forecast

 

What I have:

ValueDate
102019-09-02
202019-09-03

 

My first approach was to calculate a tally table in m query to get all dates for the current year

= List.Dates(#date(Date.Year(DateTime.LocalNow()), 1, 1), 365, #duration(1, 0, 0, 0))

I then join both tables to get this table:

ValueDateDate_joined
102019-09-022019-09-02
202019-09-032019-09-03
  2019-09-04
  ...
  2019-12-31

 

With DAX I created a calculated column to fill in the blanks with the average of [value] * the value from the slicer (Adjustment Value).  It does work with my dummy data to fill in the average amount but the '*Adjustment[Adjustment Value])' section is beeing ignored.

IF(DummyData[Date]=DummyData[Date_joined];DummyData[Value];(DummyData[Average]*Adjustment[Adjustment Value]))
ValueDateDate_joinedCombined
102019-09-022019-09-0210
202019-09-032019-09-0320
  2019-09-0415
  ...15
  2019-12-3115

 

 

 

As always, I think there possibly is an easy solution I'm not aware of.

 

Thanks in advance for any guidance 🙂

 

 

You can download the file here: Link

 

 

Sources I tried but couldn't get to work:

https://www.sqlbi.com/articles/showing-actuals-and-forecasts-in-the-same-chart-with-power-bi/

https://community.powerbi.com/t5/Desktop/Revenue-forecast-from-actual-sales/m-p/280437#M124944

1 ACCEPTED SOLUTION

Hi @whereismydata 

 

I think it's cozed by you didn't set the relationship between DummyData table with Adjustment table.  The adjustedaverage value could not be defined correctly.

 

When I rebuild the adjustment table with adding "Person" column, and manage the relationship. the [Combined] column show directly.

 

 

Community Support Team _ Dina Ye
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

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @whereismydata 

 

Would you mind share me your dummy pbix? that would be easier for us to search in depth.

 

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

Hi @v-diye-msft ,

 

I uploaded the file; also when creating this dummy environment filling the blanks with an average value works. So there seems to be an issue with my real data. But the multiplication with the what if parameter does not work. Maybe you'll have an idea whats wrong.

 

also it would be interesting to know if there is an easier solution for my problem.

 

all the best and thank you!

Hi @whereismydata 

 

I think it's cozed by you didn't set the relationship between DummyData table with Adjustment table.  The adjustedaverage value could not be defined correctly.

 

When I rebuild the adjustment table with adding "Person" column, and manage the relationship. the [Combined] column show directly.

 

 

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

Hi @v-diye-msft 

 

thank you very much for your reply and the attached file. I'll take a look into it today.

 

best

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.