Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm stuck on how to figure this out.
I have a slicer for fiscal week end date and a table that displays for each week end date the week days and then compares to last fiscal year week. Each fiscal week end date is always a Saturday.
So for week ending 9/2/2023, the days are Friday 9/1/2023 to Saturday 9/2/2023. The last fiscal year week is Thursday 9/1/2022 to Saturday 9/3/2022.
So, my table ends up only showing Friday and Saturday because my slicer selection is week end 9/2/2023, which only contains 2 days. Last year Thursday 9/1/2022 is only included the computed total line. I have the correct calculations to get last fiscal week numbers, but the "Thursday" row, I can't figure out how to get to display.
I'm wanting to basically always show all 7 days on the table, with blanks where appropriate. I've tried a disconnected table for the 7 days in a week, but could not figure out how to get the calculation for total sales to work for each day of the disconnected table.
This is only an issue when the first week of fiscal year is a partial week or last week of fiscal year is a partial week.
Need some pointers on how to do this.
Bob
Solved! Go to Solution.
Thanks. It wasn't the exact solution for me, but it helped me get to my solution.
Thanks,
Bob
Hello @bobbyd,
Can you please try the following approach:
1. Create a Disconnected Table for the Days of the Week
DaysOfWeek =
DATATABLE(
"Day", STRING,
{
{"Sunday"},
{"Monday"},
{"Tuesday"},
{"Wednesday"},
{"Thursday"},
{"Friday"},
{"Saturday"}
}
)
2. Create a measure to calculate the total sales for each day
TotalSalesByDay =
VAR SelectedEndDate = SELECTEDVALUE('Calendar'[Fiscal Week End Date])
VAR SelectedStartDate = SelectedEndDate - 6
VAR SalesForDay =
CALCULATE(
SUM('Sales'[Amount]),
FILTER(
'Calendar',
'Calendar'[Date] >= SelectedStartDate &&
'Calendar'[Date] <= SelectedEndDate &&
'Calendar'[DayName] = SELECTEDVALUE(DaysOfWeek[Day])
)
)
RETURN
SalesForDay
Hope this helps.
Thanks. It wasn't the exact solution for me, but it helped me get to my solution.
Thanks,
Bob
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |