Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

powerbi - Power Bi forecast projected sales accross days / months between a date range

I am trying to create a monthly forecast for a list of clients that have different start and end dates for their spending.

I am able to create a formula that would work in excel, but am learning Power Bi and having troubles converting the formula to something that would work inside Power Bi without adding the formula to excel file. Column A-F are how the raw data is delivered. Columns G-R are columns that i am trying to avoid adding thru a Dax formula

Pending Sample excel data

question from:https://stackoverflow.com/questions/65838934/power-bi-forecast-projected-sales-accross-days-months-between-a-date-range

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

it might help if you unpivot the prorate monthly amounts in power query first (since narrow tables better than wide tables) client Start Date End Date PendingMarket$ PendingShare Month Value Client 1 3/1/2021 3/1/2021 $10,618 3.0% jan 0 Client 1 3/1/2021 3/1/2021 $10,618 3.0% feb 0 Client 1 3/1/2021 3/1/2021 $10,618 3.0% mar 319

then the dax formulae is easy

for a calculated column on the table: Pending Station $ (Prorated) = CALCULATE(SUM(MyTableName[Value]), [Strat Date] = Earlier([Start Date], [End Date] = Earlier[End Date], [Client] = Earlier[Client])

PN earlier get the value of current row for column value


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...