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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Revenue Year to Date

Hello!  I am having difficulty making a dax formula to create a revenue year to date.  Attached is the code that I have and tables that I have as well.  Thanks in advance! 

 

Dax:

Revenue YTD =
TOTALYTD([Revenue], 'public view_transactions'[date].[Date])
 
Revenue = sum('public view_transactions'[line_amount])
 
 
Tables[columns]:
transactions [date, line_amount]
 
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Revenue YTD =
TOTALYTD([Revenue], 'public view_transactions'[Date])
 
This code seems to be working

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Revenue YTD =
TOTALYTD([Revenue], 'public view_transactions'[Date])
 
This code seems to be working
Anonymous
Not applicable

I had this working about a week ago, but it just recently stopped working. I have a column in a table already that's joined properly that has date in it.  I shouldn't have to create ANOTHER date table.  

 

Revenue = sum('public view_transactions'[line_amount])
 
Revenue YTD =
TOTALYTD([Revenue], 'public view_transactions'[date].[Date])

 

nattiej101_0-1617112498201.png

 

Anonymous
Not applicable

nattiej101_0-1616594832552.png

 

So it's coming in and not giving me an error, it's just blank.  But I have about 2 million lines of data in my report.

 

Hi @Anonymous ,

 

You should create a calendar table first.

Please refer to my .pbix file.

v-lionel-msft_0-1616744038780.png

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

@Anonymous , do not use [Date].Date, In case your date have timestamp, create a new date

 

New Date = [Date].date
or
New Date = date(year([Date]),month([Date]),day([Date]))

 

Then join this date with date table and use time intelligence

TOTALYTD([Revenue], 'Date'[Date])

 

Refer to my Video, Why TI Fails : https://youtu.be/OBf0rjpp5Hw

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

It's not letting me create a measure of a new column in the table for that.  I even changed the query to be date instead of a date with a timestamp.

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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