cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
katieq Frequent Visitor
Frequent Visitor

YTD based on slicer in matrix

Hi

 

I currently have this formula to calculate YTD , however this means that I have to change the date in the formula every time i want to change the month.

 

Is there a measure i can create which provides me the YTD value, based on the month that is selected on my slicer? I have a column in the table which is a date.

 

SC YTD = TOTALYTD(sum(Append1[Actual/Forecast]),DATESBETWEEN(Append1[Date],DATE(2019,01,01),DATE(2019,03,31)))

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
v-joesh-msft Established Member
Established Member

Re: YTD based on slicer in matrix

Hi @katieq ,

You can create a Date table: Date = CALENDARAUTO()

Then create a measure like this:

SC YTD = CALCULATE(SUM(Append1[Actual/Forecast])),DATESYTD('Date'[Date]))

Results are as follows:

1.PNG

 

Here is a demo, please try it

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Ed5ioHwnWD9FvTvdsw...

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-joesh-msft Established Member
Established Member

Re: YTD based on slicer in matrix

Hi @katieq ,

You can create a Date table: Date = CALENDARAUTO()

Then create a measure like this:

SC YTD = CALCULATE(SUM(Append1[Actual/Forecast])),DATESYTD('Date'[Date]))

Results are as follows:

1.PNG

 

Here is a demo, please try it

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Ed5ioHwnWD9FvTvdsw...

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 494 members 4,464 guests
Please welcome our newest community members: