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.
Hello,
I have a bar chart showing hours per week actuals vs target. Now It shows latest 20 weeks, i want the chart to show the latest 20 weeks but also the future 4 weeks. This in order to see what the target level are at in the coming weeks.
Can someone help me?
Is it possible to show both latest and future weeks?
Thanks for the support,
Solved! Go to Solution.
Hi @AnnaML ,
You could create a new table with Week column(with Year*100+WeekNum format) for slicer,and use the following formula to create a measure:
Week =
YEAR ( [Date] ) * 100
+ WEEKNUM ( [Date], 1 )
Measure =
IF (
MAX ( 'Table'[Week] )
>= SELECTEDVALUE ( ForSlicer[Week] ) - 20
&& MAX ( 'Table'[Week] )
<= SELECTEDVALUE ( ForSlicer[Week] ) + 4,
1,
0
)
Then apply it to visual-level filter,set as "is 1" like this:
Please take a look at the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AnnaML ,
You could create a new table with Week column(with Year*100+WeekNum format) for slicer,and use the following formula to create a measure:
Week =
YEAR ( [Date] ) * 100
+ WEEKNUM ( [Date], 1 )
Measure =
IF (
MAX ( 'Table'[Week] )
>= SELECTEDVALUE ( ForSlicer[Week] ) - 20
&& MAX ( 'Table'[Week] )
<= SELECTEDVALUE ( ForSlicer[Week] ) + 4,
1,
0
)
Then apply it to visual-level filter,set as "is 1" like this:
Please take a look at the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your time and effort! It helped me!
@AnnaML , Create column like these in you date table and filter on that
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Type = Switch( True(),
[start week]>=Today()-150 &&
[start week]<=Today()+ 28 ,"Last 20 + next 4 Week" ,
[Week Name]
)
filter Last 20 + next 4 Week
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |