Forum Discussion
Preeti_Yadav
4 years agoResolver I
IF returning Incorrect totals
Hi . I am calculating Amount using Amount= IF( FIRSTNONBLANK('HRDataSen DaxLaborDetail'[OTMult],0)=1.00, SUM('HRDataSen DaxLaborDetail'[WorkedHours])*SUM('HRDataSen DaxLaborDetail'[CalcRat...
- 4 years ago
Preeti_Yadav what is the granularity?
Like each row has a unique value in ADPworklocationdescroption column or it's a combination of also EmployeeID and ApplyDate.
Anyway try:Amount = SUMX ( SUMMARIZE ( 'Table Name', 'Table Name'[ADPworklocationdescroption], 'Table Name'[EmployeeID], 'Table Name'[ApplyDate] ), CALCULATE( IF( FIRSTNONBLANK('HRDataSen DaxLaborDetail'[OTMult],0)=1.00, SUM('HRDataSen DaxLaborDetail'[WorkedHours])*SUM('HRDataSen DaxLaborDetail'[CalcRate]), SUM('HRDataSen DaxLaborDetail'[WorkedHours])*SUM('HRDataSen DaxLaborDetail'[CalcRate])/1.5 ) ) )
Will apprecuiate Your Kudos on my messages 🙂
SpartaBI
4 years agoCommunity Champion
Preeti_Yadav SUMX should be the solution for that, but need to see how exacty you used it in the visual.
Can you give more info about how the visual looks like and what are the names of the column in play in that visual.
Preeti_Yadav
4 years agoResolver I
- SpartaBI4 years agoCommunity Champion
Preeti_Yadav what is the granularity?
Like each row has a unique value in ADPworklocationdescroption column or it's a combination of also EmployeeID and ApplyDate.
Anyway try:Amount = SUMX ( SUMMARIZE ( 'Table Name', 'Table Name'[ADPworklocationdescroption], 'Table Name'[EmployeeID], 'Table Name'[ApplyDate] ), CALCULATE( IF( FIRSTNONBLANK('HRDataSen DaxLaborDetail'[OTMult],0)=1.00, SUM('HRDataSen DaxLaborDetail'[WorkedHours])*SUM('HRDataSen DaxLaborDetail'[CalcRate]), SUM('HRDataSen DaxLaborDetail'[WorkedHours])*SUM('HRDataSen DaxLaborDetail'[CalcRate])/1.5 ) ) )
Will apprecuiate Your Kudos on my messages 🙂