Forum Discussion
Help Needed: Displaying Previous and Next Week in Power BI Table Visual
- 1 month ago
Hi Tine82 ,
Thanks you for reaching out to fabric community.
Thanks pankajnamekar25 and jgeddes for the prompt response.
Could you please check the provided solution and let us know if you have any further questions.
Thanks!!
Hello Tine82
Add two measures using CALCULATE + ALL to pivot to the adjacent week, then put them next to Order Qty in your table.
Prev Week Order Qty =
VAR CurrentWeek = SELECTEDVALUE('WeekTable'[Week Number])
RETURN
CALCULATE(
SUM('FactTable'[Order Qty]),
ALL('WeekTable'),
'WeekTable'[Week Number] = CurrentWeek - 1
)
Next Week Order Qty =
VAR CurrentWeek = SELECTEDVALUE('WeekTable'[Week Number])
RETURN
CALCULATE(
SUM('FactTable'[Order Qty]),
ALL('WeekTable'),
'WeekTable'[Week Number] = CurrentWeek + 1
)
Drop both into the table alongside your existing Order Qty column. Product/Material filter stays intact automatically; only the week filter gets overridden.
If my response helped you, please consider clicking
Accept as Solution ✅ and giving it a Like 👍 – it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn |
Data With Pankaj - YouTube