Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Extrapolate average montly expenses to remaining months of the year

Hi all,

 

I am trying to find a solution for the following problem and I do not have that much experience yet with Power BI. Therefore the help of this community would be much appreciated! 

 

I want to use the monthly average of expenses for current year and extrapolate that value for the remaining months of the year. 

On top of that I would like to have the possibility to multiply the extrapolated value for the months of may and nov with a value such as 1.1. 

 

 

So if available expenses are available up to february, the extrapolated outcome should look like this:

MonthExpense amountMultiply value

jan

10 
feb6 
mrt8 
apr8 
may8.81.1
jun8 
jul8 
sep8 
oct8 
nov8.41.05
dec8 

 

Thanks in advance for thinking along with me!

 

Best,

Yoran

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Anonymous,

 

This solution uses a star schema with a date table.

 

DataInsights_0-1651237993687.png

 

Measures:

 

Total Amount = SUM ( FactTable[Expense Amount] )
Extrapolated Amount = 
// use ALLSELECTED to use only filters external to the visual
VAR vAverage =
    CALCULATE ( AVERAGE ( FactTable[Expense Amount] ), ALLSELECTED () )
VAR vTable =
    ADDCOLUMNS (
        VALUES ( DimDate[Month] ),
        "@Amount",
            SWITCH (
                TRUE,
                [Total Amount] <> BLANK (), [Total Amount],
                DimDate[Month] = "May", vAverage * 1.1,
                DimDate[Month] = "Nov", vAverage * 1.05,
                vAverage
            )
    )
VAR vResult =
    SUMX ( vTable, [@Amount] )
RETURN
    vResult

 

DataInsights_1-1651238061261.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks for the help! 

DataInsights
Super User
Super User

@Anonymous,

 

This solution uses a star schema with a date table.

 

DataInsights_0-1651237993687.png

 

Measures:

 

Total Amount = SUM ( FactTable[Expense Amount] )
Extrapolated Amount = 
// use ALLSELECTED to use only filters external to the visual
VAR vAverage =
    CALCULATE ( AVERAGE ( FactTable[Expense Amount] ), ALLSELECTED () )
VAR vTable =
    ADDCOLUMNS (
        VALUES ( DimDate[Month] ),
        "@Amount",
            SWITCH (
                TRUE,
                [Total Amount] <> BLANK (), [Total Amount],
                DimDate[Month] = "May", vAverage * 1.1,
                DimDate[Month] = "Nov", vAverage * 1.05,
                vAverage
            )
    )
VAR vResult =
    SUMX ( vTable, [@Amount] )
RETURN
    vResult

 

DataInsights_1-1651238061261.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.