cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

sum week end value at monday

 

 

Good Monring experts!

 

I need help bucause I don't manage to create the mesaure in object.

 

I have a table with all days of week and i need to "sum" saturday and sunday on monday. I try with the suggestion in this tread https://community.powerbi.com/t5/Desktop/Sum-weekend-values-on-monday/td-p/189506 but it doesn't work.

 

Can we help me? I atttach the image

 

thank you

fil

 

 

pbix image.jpg

 

 

 

2 ACCEPTED SOLUTIONS

Hi and thank you for your answer!!

 

I have a problem with this peace of DAX:

 

FILTER (
                ALLSELECTED ( Table ),
                YEAR ( Table[Date] ) = YEAR ( currdate )
                    && WEEKNUM ( Table[Date] ) = WEEKNUM ( currDate, 1 )

 

When I write the YEAR DAX I can't insert table date. Is it normal???? 

View solution in original post

Hi @filippoalicicco,

 

>>When I write the YEAR DAX I can't insert table date. Is it normal???? 

Can you please share more detail? BTW, my formula is a measure. Which connection mode you test, is it direct query?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @filippoalicicco,

 

You can consider to use if statement with weekday function to get current date, then use it to filter and summary record.

Summary on Monday =
VAR currDate =
    MAX ( Table[Date] )
RETURN
    IF (
        WEEKDAY ( currDate, 2 ) = 1,
        CALCULATE (
            SUM ( Table[Amount] ),
            FILTER (
                ALLSELECTED ( Table ),
                YEAR ( Table[Date] ) = YEAR ( currdate )
                    && WEEKNUM ( Table[Date] ) = WEEKNUM ( currDate, 1 )
            )
        ),
        SUM ( Table[Amount] )
    )


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi and thank you for your answer!!

 

I have a problem with this peace of DAX:

 

FILTER (
                ALLSELECTED ( Table ),
                YEAR ( Table[Date] ) = YEAR ( currdate )
                    && WEEKNUM ( Table[Date] ) = WEEKNUM ( currDate, 1 )

 

When I write the YEAR DAX I can't insert table date. Is it normal???? 

View solution in original post

Hi @filippoalicicco,

 

>>When I write the YEAR DAX I can't insert table date. Is it normal???? 

Can you please share more detail? BTW, my formula is a measure. Which connection mode you test, is it direct query?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors