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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Rsanjuan
Advocate III
Advocate III

Line Chart help

Hi,

 

I want to display the progress for a Month-to-date Line chart, similar to what I did below for the YTD chart:

 

Capture.JPG

 

But instead for the MTD chart, I want to display the 4 weeks of that month on the x-axis.  How can I go about doing this?

 

So far, I have this:  BidWeek = WeekNum(Bids[CreatedDate].[Date])

 

But it's displaying all of the weeks in the year.  I just want it for the current month.  Also, for a Week-to-date chart, I would like to see the progress on a daily basis with the start of the week on Sunday,  how do I create a dax expression to only show for the current week where the days are listed, Monday, 9/19, Tuesday, 9/20, etc.?

 

Thanks!

 

 

 

 

1 REPLY 1
Anonymous
Not applicable

Hi @Rsanjuan,

In your scenario, you can create a separate Date table, create relationship using Date columns between Date table and your current table. Then you can create calculated columns in the Date table using the following formals.  

1. Use the following formula to create a MTD calculated column.
MTD = IF(MONTH('Date'[Date])=Month(NOW()), "Current Month", Format([Date], "YYYY mmmm"))

2. Use the following formulas to create a WTD calculated column.
IsInCurrentYear = if(YEAR(NOW())= [Year],1,0)
WeekOfYearNumber = WEEKNUM([Date])
WTD = if([isInCurrentYear] && WEEKNUM(NOW())=[WeekOfYearNumber],"CurrentWeek",Format([Date], "YYYY mmmm"))

3. Use the above calculated columns in slicer to filter your Line chart.
1.PNG2.PNG

For more details, you can review the example in  this attached PBIX file.

Thanks,
Lydia Zhang

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors