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.
Dear Community,
I have an issue with displaying the YTD with the use of a relative date filter.
For example, for my sales report i want to use a relative date filter to display the sales in this month and the sales YTD.
Now if i apply a relative date filter to always have the filter set to the current month i will get the value for the sales this month but i will get a blank value for my sales YTD.
Now i have tried some formulas from different sources on the forum but these will still leave me with the result this month in the YTD.
I am currently using the quick measure functionality for the YTD.
My question is, how do i get the YTD working in combination with a relative date filter?
have you tried any solutions explained here:
https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/
if so then probably your data model/current measures would have to be adjusted - can you share how it looks at the moment?
@Stachu Thanks for your response.
When i just select a "regular" month through a slicer for example june i get the following:
Which is correct, now when i stop using the regular month as a slicer but instead use a report level filter with a relative date set to "this month". I get the following:
As you can see the YTD is now gone where the info that is for this month is still there.
See below for the relative date filter:
I cannot replicate it, it works for me, for a very simple measure
Measure = CALCULATE(SUM('Table'[Value]),DATESYTD('Table'[Date]))
what's the syntax for your YTD measure?
@Stachu thanks for the quick response.
Your suggested measure does work, however since the relative date filter sets the date filter from 1-6-2018/30-6-2018 the YTD will only pick up from that, see image:
How do i get the 1,961k as YTD june?
if it ony picks up one month it means it doesn't work - it should pick up Jan-Jun, that's what DATESYTD is supposed to do
it could be that the DATESYTD should use different field for the reference - do you have a time table in your model?
https://docs.microsoft.com/en-us/power-bi/desktop-date-tables
@Stachu i have a date table that i'm using, i have made sure to use it for the suggested formula as well, see screenshots.
are there any others time related filters that may affec this? I see something on Mesec - not blank, maybe there is more?
@Stachu oh i'm sorry i didn't specify this, i cleared all the filters except the one i showed you and even created a new page with nothing in it and then created a new visual KPI for the data, this is blank when i put the relative date on this month.
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |