The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello! I have a Cumulative Sales (Pink) and want to add my cumulative forecast (Black) so the starting point of the forecast =ending value of sales.
Sales and forecast are in different tables, and it's not an option to join.
How to do it?
Solved! Go to Solution.
Hello @Anonymous
One method would be: find the last nonblank value of Cumulative Sales and add that to the existing Cumulative Forecast.
As an example, if you have:
then the measure could look like this:
Cumulative Forecast Shifted = VAR LastCumulativeSales = CALCULATE ( [Cumulative Sales], LASTNONBLANK ( ALL ( 'Date'[Date] ), [Cumulative Sales] ) ) VAR CumulativeForecast = [Cumulative Forecast] RETURN IF ( NOT ISBLANK ( CumulativeForecast ), LastCumulativeSales + CumulativeForecast )
There may be some tweaking required based on your data model but that's the logic I would use.
Regards,
Owen
Hello @Anonymous
One method would be: find the last nonblank value of Cumulative Sales and add that to the existing Cumulative Forecast.
As an example, if you have:
then the measure could look like this:
Cumulative Forecast Shifted = VAR LastCumulativeSales = CALCULATE ( [Cumulative Sales], LASTNONBLANK ( ALL ( 'Date'[Date] ), [Cumulative Sales] ) ) VAR CumulativeForecast = [Cumulative Forecast] RETURN IF ( NOT ISBLANK ( CumulativeForecast ), LastCumulativeSales + CumulativeForecast )
There may be some tweaking required based on your data model but that's the logic I would use.
Regards,
Owen
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |