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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Niels_T
Post Patron
Post Patron

How to display current month in line chart?

Hello,

 

I would like to display the sales of the current month in a line chart and that it automatically updates itself.

 

I've written a DAX measure but it doesn't seem to work: 

Current Month Sales = TOTALMTD(SUM('Magento - Order Line'[Row Total Incl. Tax]),DATESMTD('Calendar'[Date]))

 

Currently I get this:

image.png

 

However I would like to get something like this:

 

image.png

 

 

2 ACCEPTED SOLUTIONS

Hi @Niels_T 

You're using a date hierarchy in your visual

dateh.png

 

Change that to just use Date.  Click the down arrow beside Date (in the axis), then click on Date.

dateh2.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

Hey Philip,


I tried what you did but this is the result I get:

 

image.png

 

I have set a filter now on date -> relative date -> show items when the value: is in this year and this fixed the issue

 

image.png

 

The measure I used for current month: 

Current Month Sales = TOTALMTD(SUM('Magento - Order Line'[Sales]),'Calendar'[Date], MONTH('Calendar'[Date]) = MONTH(TODAY()))
 
Thanks Philip for the help!

View solution in original post

6 REPLIES 6
PhilipTreacy
Super User
Super User

Hi @Niels_T 

Download sample PBIX file

Try this, note the 3rd parameter which is a filter

 

Current Month Sales = TOTALMTD(SUM('Table'[Value]),'Calendar'[Date], MONTH('Calendar'[Date]) = MONTH(TODAY()))

 

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


When I use this measure my graph becomes blank:

 

image.png

 

I looked into the power BI file that you provided, and I don't know what you are doing different. 

 

I have a date table and all that so that shouldn't be an issue as well.

Hi @Niels_T 

You're using a date hierarchy in your visual

dateh.png

 

Change that to just use Date.  Click the down arrow beside Date (in the axis), then click on Date.

dateh2.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hey Philip,


I tried what you did but this is the result I get:

 

image.png

 

I have set a filter now on date -> relative date -> show items when the value: is in this year and this fixed the issue

 

image.png

 

The measure I used for current month: 

Current Month Sales = TOTALMTD(SUM('Magento - Order Line'[Sales]),'Calendar'[Date], MONTH('Calendar'[Date]) = MONTH(TODAY()))
 
Thanks Philip for the help!
amitchandak
Super User
Super User

@Niels_T , what you have taken on x-axis?

What you are displaying on the x-axis on the visual below?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

The two visuals are not related to each other. The visual below also comes from Google Data Studio.

 

The axises contain the following data:

image.png

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors