Forum Discussion
kostask
3 years agoHelper 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...
- 3 years ago
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
3 years agoSuper 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] )