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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
kostask
Helper II
Helper II

Sumarrizing problem

Hi guys!

I have a table (Production)  in which there is the daily production of the company's personnel. Above a production limit, a productivity bonus is given. The logic is simple:

DayBonus = IF(SUM(Production[Production])>=[ProductionTarget],10, BLANK())
So, the result on a table seems like this:
Capture.PNG
The row headers describe the employee number and the column headers, the date.
Dates come from a separate Date table. Employees' numbers exist only in the main table (Production)
How can I modify my formula to get the right summarized total results by row and by column?
Thank you
Kostas
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Bonus =
VAR SummaryTable =
    ADDCOLUMNS (
        SUMMARIZE ( 'Production', 'Production'[Employee ID], 'Date'[Date] ),
        "@value",
            IF (
                CALCULATE ( SUM ( 'Production'[Production] ) ) >= [ProductionTarget],
                10,
                BLANK ()
            )
    )
RETURN
    SUMX ( SummaryTable, [@value] )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Try

Bonus =
VAR SummaryTable =
    ADDCOLUMNS (
        SUMMARIZE ( 'Production', 'Production'[Employee ID], 'Date'[Date] ),
        "@value",
            IF (
                CALCULATE ( SUM ( 'Production'[Production] ) ) >= [ProductionTarget],
                10,
                BLANK ()
            )
    )
RETURN
    SUMX ( SummaryTable, [@value] )

@johnt75 works fine!

Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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