# Grouping Sat-Sun-Mon into Monday

Hello,

I’m re-doing a Tableau report in Power BI. The report contains a calculation where I want to combine Sat-Sun-Mon revenue into “Monday revenue”… and report that with the typical Tue revenue, Wed rev, Thu rev, and Fri rev.

I’m attaching both the PBIX and further details about the desired outcome, and how it was accomplished in Tableau.

All help is appreciated.

Best regards,
Kevin

Grouping Days.docx (69.9 KB)

RECEIVABLES TEST DASH.pbix (209.2 KB)

Hello @kkieger,

Thank you for posting your query onto the Forum.

Firstly, I’d set up a Date Table in your model. Below is the screenshot provided for the reference -

And then here’s the formula that I’ve used to calculate the “Total Actual Revenue” for weekly sales.

``````Total Actual Non Weekend Days =
VAR WeekendCheck = SELECTEDVALUE( Dates[Day Type] ) = "Weekend"
VAR WorkdayCheck = SELECTEDVALUE( Dates[DayOfWeekName] ) = "Monday"

RETURN
IF( WeekendCheck = TRUE, BLANK(),
IF( WorkdayCheck = FALSE,
[Total Actual],
CALCULATE( [Total Actual],
FILTER( ALL( Dates ),
Dates[Date] > MIN( Dates[Date] ) - 3 && Dates[Date] <= MIN( Dates[Date] ) ) ) ) )
``````

Below is the screenshot of the result provided for the reference -

I’m also attaching the working of the PBIX file for the reference. Also providing the link of a video below where Sam has covered this concept.

Hoping you find this useful and meets your requirements.

Thanks and Warm Regards,
Harsh

RECEIVABLES TEST DASH.pbix (258.0 KB)

1 Like

Hi @kkieger,

Also attaching the working of the Total Forecast, if required.

Thanks and Warm Regards,
Harsh

RECEIVABLES TEST DASH v2.pbix (257.9 KB)

I thought of giving a try with Power Query, but after seeing so many calculated columns it was not feasible. the above reply by @Harsh solved your problem. Just small advice try to change your Calculated columns into Measures (columns not used for slicer) as it will be very faster and your model will consume less memory.

This is excellent. I’ll mark the issue as complete.

If you have a link or source file for adding the date table used, I’d appreciate you providing it.

Thank you,
Kevin

Hello @kkieger,

You’re Welcome.