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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Stharwani
Advocate I
Advocate I

Dax: convert monthly data to weeks

Hi team,

 

I am using this formula to show week number Weeks = ROUNDDOWN(('Date'[Date] - 'Date'[StartOfFY]+2)/7,0)+1 

 

When I try to show it along with months on a bar chart, the shared week appears twice. Is there any way to change this so it only appears once?

 

weeks.PNG

 

Thanks,

Sonali

4 REPLIES 4
DAX0110
Resolver V
Resolver V

Hi @Stharwani, the approach I'd suggest is to create another calculated column that computes the MAX(Month) for each Weeks value, then put that MAX(Month) column on the chart together with Weeks.

 

On the other hand, if you want to "snap" each Weeks value to the lower of the two months, use MIN(Month)

 

 

No, that did not work. 

Any ideas @ImkeF @MattAllington

Thanks. 

My advice is to create a proper calendar table. 
Read my article here  https://exceleratorbi.com.au/power-pivot-calendar-tables/ 

and my blog here https://powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/ 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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