Forum Discussion
Problem with splitted WEEKNUM
Hello everyone,
I have a problem with the calendar week.
I want to make a list of the hours worked per calendar week.
If the calendar week is in two months, it will be displayed twice. Logically, this is correct, but I would like to summarize this in the display.
Do you have an idea how I can solve this?
Thanks in advance and best regards
Hi, Anonymous
It’s my pleasure to answer for you.
According to your description,I think you can create a column, then use it in X axis.
Like this:
measure = VAR a = CALCULATE ( DISTINCTCOUNT ( Table[Jahr] ), FILTER ( ALL ( Table ), [Jahr] = EARLIER ( Table[Jahr] ) && [Kalenderwoche] = EARLIER ( Table[Kalenderwoche] ) ) ) VAR b = CONCATENATEX ( CALCULATETABLE ( DISTINCT ( table[Monat] ), FILTER ( ALL ( Table ), [Jahr] = EARLIER ( Table[Jahr] ) && [Kalenderwoche] = EARLIER ( Table[Kalenderwoche] ) ) ), table[Monat], "+" ) RETURN IF ( a > 1, [Jahr] & b & [Kalenderwoche], [Jahr] & [Monat] & [Kalenderwoche] )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandak
Super User
@LuSt92 , Create a week start or weekend or weekend and use it.
Start date of the week : 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
End date of week : 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)Month of the week Home - eomonth([Start date of the week],-1)+1 //week start of the month
Month of the week - format([Start date of week],"MMM-YYYY")
- AnonymousNot applicable
Thank you! 🙂
- v-janeyg-msft
Community Support
Hi, Anonymous
It’s my pleasure to answer for you.
According to your description,I think you can create a column, then use it in X axis.
Like this:
measure = VAR a = CALCULATE ( DISTINCTCOUNT ( Table[Jahr] ), FILTER ( ALL ( Table ), [Jahr] = EARLIER ( Table[Jahr] ) && [Kalenderwoche] = EARLIER ( Table[Kalenderwoche] ) ) ) VAR b = CONCATENATEX ( CALCULATETABLE ( DISTINCT ( table[Monat] ), FILTER ( ALL ( Table ), [Jahr] = EARLIER ( Table[Jahr] ) && [Kalenderwoche] = EARLIER ( Table[Kalenderwoche] ) ) ), table[Monat], "+" ) RETURN IF ( a > 1, [Jahr] & b & [Kalenderwoche], [Jahr] & [Monat] & [Kalenderwoche] )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.