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.
I have a dataset with the hours worked for multiple projects on each day.
I want a line and column chart that displays the hours worked on a certain project (selected from slicer) with year - week as the shared axis as well as a cumulative line.
I know how to get this to work when using just the date, however, when I create a running total based off the week, it resets each year. How would I prevent this from happening?
The only sort of sulution I have found was creating a YearWeek column, e.g. 201901, 201902 etc. However this is not ideal for displaying the axis.
My current DAX (that resets every year):
Hours running total in Week of Year =
CALCULATE(
SUM('MAMUT'[Hours]),
FILTER(
ALLSELECTED('MAMUT'[Week of Year]),
ISONORAFTER('MAMUT'[Week of Year], MAX('MAMUT'[Week of Year]), DESC)
)
)
Thank you for your time!
Solved! Go to Solution.
Thank you for your reply.
I did manage to get it to work with the YYYYWW format, but found it to be less nice on the UI side of things if I plot it in a bar graph (with the Year and Week of Year combination I can nicely collate them).
But I think I will just have to live with that and go for the YYYYWW solution.
Thank you!
@spmvoss ,
You to create a combined measure YYYYWW and use that.
Or you can use Week Rank, Like I have used in file : https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
CALCULATE(
SUM('MAMUT'[Hours]),
FILTER(
ALLSELECTED('MAMUT'[Week of Year]),
ISONORAFTER('MAMUT'[Week Rank], MAX('MAMUT'[Week RANK]), DESC)
)
)
Better you move Week outside your fact in a new table and create week Rank there.
Thank you for your reply.
I did manage to get it to work with the YYYYWW format, but found it to be less nice on the UI side of things if I plot it in a bar graph (with the Year and Week of Year combination I can nicely collate them).
But I think I will just have to live with that and go for the YYYYWW solution.
Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |