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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.