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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.