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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.