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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Creating measure to-date

Hi, 

 

I am wanting to only show a count to-date.. This current table and graph is comparing this year's to-date number to the complete last year total (making it look like we are way under: 

 

todate.PNG

 

Here are the measures creating the values:

 

% Conversion Rate = [Funded Sales]/[Written Sales]

Written Sales = CALCULATE(SUM(Facts[MetricValue]), Facts[MetricName] = "WrittenSales")

Funded Sales = CALCULATE(SUM(Facts[MetricValue]), Facts[MetricName] = "FundedSales")

 

Any help?

 

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Use the function SAMEPERIODLASTYEAR() function.  Remove years from your visuals and place them in a filter/slicer.  Select 2017 in the filter/slicer.  Use this measure

 

% conversion rate LY = CALCULATE([% conversion rate],SAMEPERIODLASTYEAR(Calendar[Date]))

 

I am assuming that you have a calendar table which has running dates.  In that calendar table, extract month and year in 2 spare columns.  Create a relatioship from the Date column of your source data table to the date column of your calendar table.  In the filter/slicer, drag the year from the calendar table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Use the function SAMEPERIODLASTYEAR() function.  Remove years from your visuals and place them in a filter/slicer.  Select 2017 in the filter/slicer.  Use this measure

 

% conversion rate LY = CALCULATE([% conversion rate],SAMEPERIODLASTYEAR(Calendar[Date]))

 

I am assuming that you have a calendar table which has running dates.  In that calendar table, extract month and year in 2 spare columns.  Create a relatioship from the Date column of your source data table to the date column of your calendar table.  In the filter/slicer, drag the year from the calendar table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
srinivt
Microsoft Employee
Microsoft Employee

Have you tried the Year-To-Date quick measure? Here is a link that provides some documentation: https://powerbi.microsoft.com/en-us/blog/quick-measures-preview/

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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