We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi .
I am calculating Amount using
Amount=
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.
My individual row values are returning correct output,however it is giving me incorrect totals.
I tried wrapping it under SUMX but to no avail.
Thanks,
Preeti
Solved! Go to Solution.
@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 🙂
@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 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 🙂
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 39 | |
| 32 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 37 | |
| 36 | |
| 22 |