cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Calculate measure for sum for each day in month

@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
Highlighted
Community Support
Community Support

Re: Calculate measure for sum for each day in month

@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

Highlighted
Helper III
Helper III

Re: Calculate measure for sum for each day in month

@v-chuncz-msft, Thanks)

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors