Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello - I am trying to achieve a formula that will only show values up to (or before) today's day. But not only for this year, for last year as well....so up to same day last year.
The formula below works fine for hiding future date periods for this year. But I need a formula that also would hide the equivalent future dates (but from last year)....if that makes sense. Essentially a year-over-year (but not cumulative), and only showing the equivalent time periods. So in other words, the column chart below shows 2021 (orange) up to the current date. I want the blue (2020) bars to also stop based on the same date, but last year. Any help is appreciated.
Hi @Anonymous ,
You can refer the content in the following links to achieve it.
Using SAMEPERIODLASTYEAR To Compare The Difference Between This Year & Last Year
This year vs Last year Calculation in Power BI using DAX
Calculate SAMEPERIODLASTYEAR for Partial Year
If the above ones are not applicable for your scenario, please provide some sample data and expected result with sample or screenshot(exclude sensitive data). Thank you.
Best Regards
@Anonymous
You need to create another measure LY count using SAMEPERIODLASTYEAR , then Create another measure LY As on Date using DATESYTD and you will get 2 values.! Hope this helps!
Proud to be a Super User!
@Anonymous
It is better use YTD ( DATESYTD) to show the value till date
Proud to be a Super User!
@VijayP How to apply that in this context? If I apply DATESYTD less than today, it will give me everything less than today which is not what I need. I need both years, this year and last year, to be filtered up until the same period of time (i.e. Feb 24 2020 and Feb 24 2021)