Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi @Puja
Thanks for reaching out to us.
>> I need to show 13 weeks in th Visual for each quarter (ex: for Quarter 3 (April-June ))
You can try this,
(1) create a calendar table
(2) create the 2 measures,
week = MAXX(FILTER('calendar','calendar'[Date]=MIN('Table'[Date])),[week])
Measure =
var _currentDate=DATE(2022,5,23)
var _currentWeek= MAXX(FILTER('calendar','calendar'[Date]=_currentDate),[week])
return IF([week]>_currentWeek-6 && [week]<_currentWeek+6,IF(([week]-_currentWeek)>0, "Week +"&([week]-_currentWeek),"Week "&([week]-_currentWeek)))
result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thank you SO MUCH @kitgo2.
I need to get weeks by quarter .
I need to show 13 weeks in th Visual for each quarter (ex: for Quarter 3 (April-June ))
Previous weeks with - and future weeks with + sign like the way in this screen shot. TIA
Hi @Puja
Thanks for reaching out to us.
>> I need to show 13 weeks in th Visual for each quarter (ex: for Quarter 3 (April-June ))
You can try this,
(1) create a calendar table
(2) create the 2 measures,
week = MAXX(FILTER('calendar','calendar'[Date]=MIN('Table'[Date])),[week])
Measure =
var _currentDate=DATE(2022,5,23)
var _currentWeek= MAXX(FILTER('calendar','calendar'[Date]=_currentDate),[week])
return IF([week]>_currentWeek-6 && [week]<_currentWeek+6,IF(([week]-_currentWeek)>0, "Week +"&([week]-_currentWeek),"Week "&([week]-_currentWeek)))
result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much @v-xiaotang
This works perfoct with the static date
var _currentDate=DATE(2022,5,23) , when i added Today(), it s not working . I want it to be dynamic .
If its current week then "Current", past weeks - and future weeks with + symbol with in the quarter.
This is past screenshot example.
TIA
Week# = if ('Calendar'[Date] = TODAY(),"Current", if (year(Today()) = Year('Calendar'[Date]),"Week " & ( WEEKNUM('Calendar'[Date],2) - WEEKNUM(today(),2)) ,"Week " & ( WEEKNUM('Calendar'[Date],2) - (WEEKNUM(today(),2) + 52))))
Start of week = if(WEEKDAY('Calendar'[Date],2) = 1, 'Calendar'[Date]) -- filter visual to only select non blanks or filter out only mondays
Format = 'Calendar'[Week#] & " " & UNICHAR(10) &
FORMAT('Calendar'[Date],"dd-mmm") & UNICHAR(10) & "Monday - Sunday"
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |