Forum Discussion
sumif construction
- 7 years ago
Hi Anonymous
Assume your data table(according to your screenshot) is like
If the table JOBS is like this, and there a relationship built between two tables (it is better to set cross filter direction "Both")
ORDER_NAME qty 1 3 2 4 3 5 4 6 5 7 Then create a measure
Measure = IF(MAX([col4])=20&&MAX([col5])="Lot",MAX([col6]),IF(MAX([col4])=30&&MAX([col5])="Item",MAX([col6])*MAX(Sheet12[qty])))
Best Regards
Maggie
Hi Anonymous
Assume your data table(according to your screenshot) is like
If the table JOBS is like this, and there a relationship built between two tables (it is better to set cross filter direction "Both")
| ORDER_NAME | qty |
| 1 | 3 |
| 2 | 4 |
| 3 | 5 |
| 4 | 6 |
| 5 | 7 |
Then create a measure
Measure = IF(MAX([col4])=20&&MAX([col5])="Lot",MAX([col6]),IF(MAX([col4])=30&&MAX([col5])="Item",MAX([col6])*MAX(Sheet12[qty])))
Best Regards
Maggie
- Anonymous7 years agoNot applicable
Thanks Maggie. Problem solved!
- Anonymous7 years agoNot applicable
Now the individual lines are correct but the sum of 'RESOURCE_REQUIRED_AMOUNT' is incorrect, which now is 13.5
This should be 32.85. I used following calculation.
Hrs_routing = IF(MAX(XXBI_MFG_RESOURCE_TXNS_V[RESOURCE_SEQUENCE_NUMBER])=20 && MAX(XXBI_MFG_RESOURCE_TXNS_V[BASIS])="Lot",max(XXBI_MFG_RESOURCE_TXNS_V[RESOURCE_REQUIRED_AMOUNT])/60,(MAX(XXBI_WIP_JOBS_V[QUANTITY_COMPLETED])*MAX(XXBI_MFG_RESOURCE_TXNS_V[RESOURCE_REQUIRED_AMOUNT]))/60)