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
The_Clam
Helper I
Helper I

Filtered last calendar month and YTD - please help

Hi.  I need help building a report/matrix.  For a specific location, I require one colum that shows sum of TICKETS per RESOLUTION for the last 1 calendar month (March in this case) and one colum that shows the YTD total.

 

Expected Result (for Building 7)

ResolutionMarchYTD
Link25
Power-Company 1

 

Data:

TicketNumberClosed DateResolutionBuilding
2547752/12/2021Link7
2555572/12/2021Hardware1
2581912/19/2021Link7
2581982/26/2021Power - Company7
2584912/18/2021Link7
2621963/3/2021Link7
2623653/3/2021Link7
2672823/18/2021Link9
2700003/26/2021Hardware8
2710804/1/2021Link8

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@The_Clam , You can use datesmtd and datesytd with date table and use building slicer

 

 

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

 

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.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@The_Clam , You can use datesmtd and datesytd with date table and use building slicer

 

 

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

 

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.

Hi.  Thanks for the reply.  I am able to get YTD and MTD, but what I need is the ticket count (not sales) for the previous month, so if I ran the report today, I need the ticket count for March and YTD.  Your answer pointed me in the right direction.  Thanks!

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.