Forum Discussion
Weeknum as per Calendar
- 5 months ago
Anonymous
it's sum ,so it sums up all the weeknum.
you can try something like this
Measure = maxx(FILTER('Date','Date'[Date]=today()),'Date'[QuarterWeekNumber])in my DAX, it shows week 11, if you want to show 10, you need to adjust the DAX codingwhat if select other quarter, what's the expected output?
Hi Anonymous,
Use below DAX fucntions to add calculated columns in your table
Week Start Monday
Week Start Monday =
'Date'[Date] - WEEKDAY('Date'[Date],2) + 1
Quarter Start Date
Quarter Start =
DATE(YEAR('Date'[Week Start Monday]),
(INT((MONTH('Date'[Week Start Monday]) - 1) / 3) * 3) + 1,
1
)
Week Number inside Quarter (1-13)
Quarter Week Number =
VAR WeekStart = 'Date'[Week Start Monday]
VAR QuarterStart =
DATE(
YEAR(WeekStart),
(INT((MONTH(WeekStart)-1)/3)*3)+1,
1
)
RETURN
INT( (WeekStart - QuarterStart) / 7 ) + 1
Quarter Label
Year Quarter =
FORMAT('Date'[Week Start Monday],"YY") &
"-Q" &
FORMAT('Date'[Week Start Monday],"Q")
π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUser and Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together!
I don't have date table and I have calendar table selecting particular column to create calculated column(measure) but getting upnormal result
- grazitti_sapna5 months agoSuper User
Hi Anonymous ,
I believe you are trying to create a measure, You need to create a calculated column instead.
- Anonymous5 months agoNot applicable
we created calculated column as mentioned earlier but does not work
- grazitti_sapna5 months agoSuper User
Hi Anonymous,
Attached is the sample .pbix file.
Please see if this is what your require