Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
SimplesHoT89
Frequent Visitor

Move data from Weekend to Friday

Hi guys,

 

I have a quite simple data table with the following issue. (date column and then a column for each product)

The data shows the production numbers on a daily basis, however some saturdays have values as well and I want to move the data from all Saturdays to the weekday before, therefore Friday because it's messing up my daily average. I'm struggling to find the right function so any help is appreciated.

SimplesHoT89_1-1655808531704.png

 

SimplesHoT89_0-1655808327477.png

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SimplesHoT89 ,

I have created a simple sample, please refer to it to see if it helps you.

Create three columns (must use columns).

ALLVALUE =
'Table'[A] + 'Table'[B] + 'Table'[C] + 'Table'[D] + 'Table'[E] + 'Table'[F]
WEEKDAY = WEEKDAY('Table'[date],2)
WEEKNO = WEEKNUM('Table'[date],2)

Then the result column you can use a measure or a column.

A measure.

Me =
VAR _WEEKEND =
    CALCULATE (
        SUM ( 'Table'[ALLVALUE] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[WEEKNO] = SELECTEDVALUE ( 'Table'[WEEKNO] )
                && 'Table'[WEEKDAY] >= 6
        )
    )
VAR _VALUE =
    CALCULATE (
        MAX ( 'Table'[ALLVALUE] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[WEEKDAY] = 5
                && 'Table'[WEEKNO] = SELECTEDVALUE ( 'Table'[WEEKNO] )
        )
    )
RETURN
    IF (
        MAX ( 'Table'[WEEKDAY] ) = 5,
        _VALUE + _WEEKEND,
        IF ( MAX ( 'Table'[WEEKDAY] ) >= 6, BLANK (), MAX ( 'Table'[ALLVALUE] ) )
    )

 A column.

Me_COLUN =
VAR _WEEKEND =
    CALCULATE (
        SUM ( 'Table'[ALLVALUE] ),
        FILTER (
            ( 'Table' ),
            'Table'[WEEKNO] = EARLIER ( 'Table'[WEEKNO] )
                && 'Table'[WEEKDAY] >= 6
        )
    )
VAR _VALUE =
    CALCULATE (
        SUM ( 'Table'[ALLVALUE] ),
        FILTER (
            ( 'Table' ),
            'Table'[WEEKDAY] = 5
                && 'Table'[WEEKNO] = EARLIER ( 'Table'[WEEKNO] )
        )
    )
RETURN
    IF (
        ( 'Table'[WEEKDAY] ) = 5,
        _VALUE + _WEEKEND,
        IF ( ( 'Table'[WEEKDAY] ) >= 6, BLANK (), ( 'Table'[ALLVALUE] ) )
    )

vpollymsft_0-1656037767861.png

If I have misunderstood your meaning, please provide more details with your desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @SimplesHoT89 ,

I have created a simple sample, please refer to it to see if it helps you.

Create three columns (must use columns).

ALLVALUE =
'Table'[A] + 'Table'[B] + 'Table'[C] + 'Table'[D] + 'Table'[E] + 'Table'[F]
WEEKDAY = WEEKDAY('Table'[date],2)
WEEKNO = WEEKNUM('Table'[date],2)

Then the result column you can use a measure or a column.

A measure.

Me =
VAR _WEEKEND =
    CALCULATE (
        SUM ( 'Table'[ALLVALUE] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[WEEKNO] = SELECTEDVALUE ( 'Table'[WEEKNO] )
                && 'Table'[WEEKDAY] >= 6
        )
    )
VAR _VALUE =
    CALCULATE (
        MAX ( 'Table'[ALLVALUE] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[WEEKDAY] = 5
                && 'Table'[WEEKNO] = SELECTEDVALUE ( 'Table'[WEEKNO] )
        )
    )
RETURN
    IF (
        MAX ( 'Table'[WEEKDAY] ) = 5,
        _VALUE + _WEEKEND,
        IF ( MAX ( 'Table'[WEEKDAY] ) >= 6, BLANK (), MAX ( 'Table'[ALLVALUE] ) )
    )

 A column.

Me_COLUN =
VAR _WEEKEND =
    CALCULATE (
        SUM ( 'Table'[ALLVALUE] ),
        FILTER (
            ( 'Table' ),
            'Table'[WEEKNO] = EARLIER ( 'Table'[WEEKNO] )
                && 'Table'[WEEKDAY] >= 6
        )
    )
VAR _VALUE =
    CALCULATE (
        SUM ( 'Table'[ALLVALUE] ),
        FILTER (
            ( 'Table' ),
            'Table'[WEEKDAY] = 5
                && 'Table'[WEEKNO] = EARLIER ( 'Table'[WEEKNO] )
        )
    )
RETURN
    IF (
        ( 'Table'[WEEKDAY] ) = 5,
        _VALUE + _WEEKEND,
        IF ( ( 'Table'[WEEKDAY] ) >= 6, BLANK (), ( 'Table'[ALLVALUE] ) )
    )

vpollymsft_0-1656037767861.png

If I have misunderstood your meaning, please provide more details with your desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous,

 

thanks for the answer. My second Screenshot was maybe a bit misleading to be fair. I do need the values from the weekend to be added to the total of the product (therefore in your example column A, B,...)  But i can simply adjust what you've posted.

 

Thanks a lot!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors