Reply
cho
Helper I
Helper I
Partially syndicated - Outbound

Show year to dates figures monthly

Hi Experts,

 

I have two tables with Date and Sales. And these two tables are connected by Date[Date] and Sales[invoice_date]. Sales table has sales values by date.
Now I need to get a measure with YTD sales. That is, cumlative sales by year. My year starts on January.

 

I added a basic measure like this:

YTD sales = TOTALYTD(SUM('Sales'[NET_AMOUNT]),Date[DATE])

 

Although this gives correct values by date, when I remove the date and add month (from Date table), values become blank. Can you please help me to show YTD figures by month.

cho_0-1683626593123.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Syndicated - Outbound

Hi,

Your measure is correct.  Just ensure that the Month field in the visual is dragged from the (seperate column that you have created in) Date 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

Syndicated - Outbound

Hi,

Your measure is correct.  Just ensure that the Month field in the visual is dragged from the (seperate column that you have created in) Date Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi @cho ,

It seems that MEASURE could not find the corresponding date.

Please check the relationship between the tables.

vrongtiepmsft_0-1683771288146.png

vrongtiepmsft_1-1683771424670.png

 

 

You can use the month in the date hierarchy.

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)