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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Line chart to show weekinmonth

I want to show weekinmonth trend line for my data ( I have data from August - December) and I further drill it down to weekinmonth as per below ilustration. 

 

Capture3.JPG

Capture4.JPG

 

However, for December month, there were only 2 weeks of data. But the trend line shows 5 weeks. It can be seen on the right handside table that there are only 2 weeks in December month. How can I fix this in order for the line chart to show only 2 weeks data as per the dataset instead of 5. 

 

Capture.JPG

 

Capture2.JPG

 

Could someone please help me with this. Thank you in advance. 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Anonymous 

it seems i got it. try to create a new field weekinmonth which will look like "Nov-1","Nov-2","Nov-3","Nov-4", "Dec-1","Dec-2", etc..

now its still aggregated by all model with no regards to month.

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

5 REPLIES 5
az38
Community Champion
Community Champion

Hi @Anonymous 

i think it's correct behaviour because your weekinmonth is a row not related to the exactly month and it aggreates data from the all weeknumber 3,4 and 5 from the data source.

to solve it try to create hierarchy which will include month and weekinmonth

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi @az38 , 

 

the weekinmonth is actually a column that I create in power BI itself with the following formula 

 

weekinmonth = 1 + WEEKNUM ( FBL1N_trends[Posting_Date] )-WEEKNUM( STARTOFMONTH (FBL1N_trends[Posting_Date]))
az38
Community Champion
Community Champion

@Anonymous 

doesnt matter. try to insert this column into hierarchy

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi @az38 , 

 

I tried creating a hierarchy with month as below. But still it shows 5 weeks for December (12). 

 

Capture.JPG

Capture.JPG

Any idea how to solve this 

az38
Community Champion
Community Champion

@Anonymous 

it seems i got it. try to create a new field weekinmonth which will look like "Nov-1","Nov-2","Nov-3","Nov-4", "Dec-1","Dec-2", etc..

now its still aggregated by all model with no regards to month.

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.