Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
DagdasAlbag
Helper I
Helper I

Show turnover YTD with a filter

Hello everybody,

i want to compare my turnover of the last three years with each other. the turnover of the last three years is in one column. i want to use a filter by showing the turnover YTD.

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DagdasAlbag , You want only selected date and range these should work

current =SUM(Sales[Sales Amount])

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

2 Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-2,Year))

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@DagdasAlbag , You want only selected date and range these should work

current =SUM(Sales[Sales Amount])

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

2 Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-2,Year))

DagdasAlbag
Helper I
Helper I

Hello,
thanks for the feedback.
i need a dax function that is flexibly linked to my filter.
example: If I choose 25.11.2020 I want to have all the last three years adjusted.
Turnover 2018: 25.11.2018
Turnover 2019: 25.11.2019
Turnover 2020: 25.11.2020
i don't want to change the dax function all the time, but that if i filter my dax function to fit. like in the example above.

amitchandak
Super User
Super User

@DagdasAlbag , Output you want is not clear, You can try like

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

2nd Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))

3rd Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors