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,
I need some help on creating a measure to calculate a forecasted monthly value using the average of the prior months in the fiscal year. The result showing in my table isnt the correct average. I am wondering where it is coming from. I used the below formula:
Average Corp Card Spend = AVERAGEX( VALUES('Calendar Dates'[Month/Year]), CALCULATE(AVERAGE('Actual Spend'[Corporate Card Spend])) )
And also, i want it to appear only on the months which have blank actual corp card values (in the example: June-Oct only)
I've also tried the following formula but didnt work to:
Average Corp Card Spend = AVERAGEX( VALUES('Calendar Dates'[Fiscal Year]), CALCULATE(AVERAGE('Actual Spend'[Corporate Card Spend])) )
the result became:
Appreciate the help!
Solved! Go to Solution.
You may try CALCULATETABLE Function and ALLEXCEPT Function as shown below.
Measure = IF ( ISBLANK ( SUM ( 'Actual Spend'[Corporate Card Spend] ) ), AVERAGEX ( CALCULATETABLE ( VALUES ( 'Calendar Dates'[Month/Year] ), ALLEXCEPT ( 'Calendar Dates', 'Calendar Dates'[Fiscal Year] ) ), CALCULATE ( SUM ( 'Actual Spend'[Corporate Card Spend] ) ) ) )
You may try CALCULATETABLE Function and ALLEXCEPT Function as shown below.
Measure = IF ( ISBLANK ( SUM ( 'Actual Spend'[Corporate Card Spend] ) ), AVERAGEX ( CALCULATETABLE ( VALUES ( 'Calendar Dates'[Month/Year] ), ALLEXCEPT ( 'Calendar Dates', 'Calendar Dates'[Fiscal Year] ) ), CALCULATE ( SUM ( 'Actual Spend'[Corporate Card Spend] ) ) ) )
Need your further help...
Just realized it doesnt show any totals for that column. How would i total them?
And also, I wanted to create a total (actual +forecasted) column - I did the below measure and it works on the row level, but the grand total included only the actual value.
Actual + Forecasted = [Total Corp Card Spend]+[Forecasted Monthly Corp Card Spend]
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
78 | |
63 | |
52 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
61 | |
60 |