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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
googlogmob
Advocate II
Advocate II

Calculate measure for sum for each day in month

We get one sum for hole month, on first day of month

and we have to divide this sum on working days number

in my case 126500 is full sum for this month

in august are 23 working days

so I have to divide 126500 to 23 (5500)

and insert 5500 in each rows in column R, so total row will be 126500
http://prntscr.com/g96vua


Please, help me in this task

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@googlogmob,

 

A calculated column might be better.

Column =
VAR y =
    YEAR ( Table1[Date] )
VAR m =
    MONTH ( Table1[Date] )
RETURN
    IF (
        Table1[IsWorkingDay] = 1,
        DIVIDE (
            LOOKUPVALUE ( Table1[Amount], Table1[Date], DATE ( y, m, 1 ) ),
            COUNTROWS (
                FILTER (
                    Table1,
                    YEAR ( Table1[Date] ) = y
                        && MONTH ( Table1[Date] ) = m
                        && Table1[IsWorkingDay] = 1
                )
            )
        )
    )
Community Support Team _ Sam Zha
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
v-chuncz-msft
Community Support
Community Support

@googlogmob,

 

A calculated column might be better.

Column =
VAR y =
    YEAR ( Table1[Date] )
VAR m =
    MONTH ( Table1[Date] )
RETURN
    IF (
        Table1[IsWorkingDay] = 1,
        DIVIDE (
            LOOKUPVALUE ( Table1[Amount], Table1[Date], DATE ( y, m, 1 ) ),
            COUNTROWS (
                FILTER (
                    Table1,
                    YEAR ( Table1[Date] ) = y
                        && MONTH ( Table1[Date] ) = m
                        && Table1[IsWorkingDay] = 1
                )
            )
        )
    )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft, Thanks)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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