Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Team,
I am having an issue where I need to calculate the sum of the budget from the start of the year which is the 1st of January and it updates automatically every month.
My table is as below
Example:
Nov-2021 | 100000 |
Dec-2021 | 100000 |
Jan-2022 | 100000 |
Feb-2022 | 100000 |
Mar-2022 | 100000 |
Apr-2022 | 100000 |
May-2022 | 100000 |
Jun-2022 | 100000 |
Jul-2022 | 100000 |
Aug-2022 | 100000 |
Sept-2022 | 100000 |
Oct--2022 | 100000 |
Nov-2022 | 100000 |
Dec-2022 | 100000 |
I tried the below measure but it does not work as I have data until Dec-2022:
Budget_FYTD_1 = Calculate(Sum(ProductBudgets[Budget]),
(DATESYTD(ProductBudgets[Period].[Month], "31/12")))
I tried to use DATESBETWEEN but can't seem to make it work.
For example, today we are the first of August, and I need the sum of my budget from Jan 2022 to July 2022 and on the first of September, I need my budget to be from Jan 2022 to Aug 2022.
Thank you in advance for your help.
Kind Regards,
Solved! Go to Solution.
Hi @Hasvine2022
please try
Budget_FYTD_1 =
VAR MaxDate =
EOMONTH ( TODAY (), -1 )
RETURN
CALCULATE (
SUM ( ProductBudgets[Budget] ),
ProductBudgets[Period] <= MaxDate,
ALL ( ProductBudgets )
)
Hi @Hasvine2022
please try
Budget_FYTD_1 =
VAR MaxDate =
EOMONTH ( TODAY (), -1 )
RETURN
CALCULATE (
SUM ( ProductBudgets[Budget] ),
ProductBudgets[Period] <= MaxDate,
ALL ( ProductBudgets )
)
Thank you tamerj1. Works great. Have an awesome day ahead.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |