Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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:
Month | Expense amount | Multiply value |
jan | 10 | |
feb | 6 | |
mrt | 8 | |
apr | 8 | |
may | 8.8 | 1.1 |
jun | 8 | |
jul | 8 | |
sep | 8 | |
oct | 8 | |
nov | 8.4 | 1.05 |
dec | 8 |
Thanks in advance for thinking along with me!
Best,
Yoran
Solved! Go to Solution.
@Anonymous,
This solution uses a star schema with a date table.
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
Proud to be a Super User!
Thanks for the help!
@Anonymous,
This solution uses a star schema with a date table.
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
Proud to be a Super User!
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |