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.
I have a YTD function that is forced, meaning that it won't repeat the same number when the YTD function can't find a new value (see image bellow).
The problem here is that as you can see my YTD (Forced) doesn't include the most recent data of April and therefore not really making it YTD as it only adds the data at the end of each month.
Here is my YTD (Forced) function:
YTD Forced =
Solved! Go to Solution.
Hi, @Niels_T
According to your description, I can clearly understand your requirement, you want to get the YTD till today but the data of this month disappeared, right? I think you can try this measure:
This is the test data I created based on your DAX formula:
YTD Forced =
var _value=
CALCULATE(SUMX(FILTER('Credit Memo + Invoice',[Date]<=TODAY()),[Amount]),DATESYTD('Calendar'[Date]))
return
IF(
YEAR(MAX('Calendar'[Date]))<YEAR(TODAY()),_value,
IF(
MONTH(MAX('Calendar'[Date]))<=MONTH(TODAY()),_value,BLANK()))
Then create a table chart to place this measure like this:
And you can get what you want.
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Niels_T
According to your description, I can clearly understand your requirement, you want to get the YTD till today but the data of this month disappeared, right? I think you can try this measure:
This is the test data I created based on your DAX formula:
YTD Forced =
var _value=
CALCULATE(SUMX(FILTER('Credit Memo + Invoice',[Date]<=TODAY()),[Amount]),DATESYTD('Calendar'[Date]))
return
IF(
YEAR(MAX('Calendar'[Date]))<YEAR(TODAY()),_value,
IF(
MONTH(MAX('Calendar'[Date]))<=MONTH(TODAY()),_value,BLANK()))
Then create a table chart to place this measure like this:
And you can get what you want.
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Niels_T Hey Mate try these Dax
Unfortunately this is not what I am looking for. The first measure is a standard YTD where the value gets repeated.
The LY YTD gives me also very different results and also does not stop till this date with showing the values.
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 |
---|---|
112 | |
103 | |
75 | |
66 | |
63 |
User | Count |
---|---|
142 | |
105 | |
102 | |
81 | |
68 |