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
shrutiiyer
Helper I
Helper I

Replicate Google Data Studio ISO week in Power BI

Hey Super Users! I'm trying to replicate Google Data Studio's ISO week on Power BI. When I get the data from Google Analytics, the ISO week displays as a number whereas what I need is a week format. Any idea if that is possible? I've added reference screenshots for more info. Thanks so much for all your help. GDS.PNGPBI.PNG

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi  @shrutiiyer ,

 

Is your issue solved now?

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hey there! No I'm yet to try all of the solutions shared by the commmunity 🙂 

Hi @shrutiiyer

 

How about adding a new column in power bi ?Such as below:

Column=[date]&"weeknum"&WEEKNUM([date])

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@shrutiiyer , You can cover your week number to date

Week to Date = var _st = date(left([Week],4),1,1)
var _week = right([Week],2)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1

 

//Sunday week

Week to Date = var _st = date(left([Week],4),1,1)
var _week = right([Week],2)*1
Return _st+((_week-1)*7) -WEEKDAY(_st,1)+1

 

Create a date calendar with all these

Date = CALENDAR(date(2015,03,01),Date(2021,02,28)) //calendar
		Week Start date = 'Date'[Date] + -1*WEEKDAY('Date'[Date],2)+1
		Week End date = 'Date'[Date] + 7 –1*WEEKDAY('Date'[Date],2)
		Week Number = WEEKNUM([Date],2)
		Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
		Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
		Week name = [Week Start date] & " to "& [Week End date]
		Weekday = WEEKDAY([Date],2)
		WeekDay Name = FORMAT([Date],"ddd")
		Year = YEAR('Date'[Date])

 

refer


https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

Greg_Deckler
Super User
Super User

@shrutiiyer - You can use Week Starting/Ending to format your week however you want 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Week-Starting/m-p/391487#M123

 

I think that 21 is the WEEKNUM parameter for ISO.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.