Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have two tables, an aggregated table(AggrTbl) and another table (Lkup) is a lookup table. They are separate now but can be joined by Staff Name. I need help in calculating the Cost.
In the AggrTbl, I need to check if StaffName exists in Lkup table. If the StaffName exist, then i need to the corrosponding Rate. Then multiply Rate times AggrWklyHrs. If StaffName does not exist in Lkup table, then I have a default rate of 50. What formula should I use for Cost in the AggrTbl ?
Solved! Go to Solution.
Try something like this:
Cost =
VAR varLookup =
LOOKUPVALUE (
Lkup[Rate];
Lkup[StaffName]; AggrTbl[StaffName]
)
RETURN
IF (
varLookup <> BLANK();
varLookup;
50
)
Regards
Try something like this:
Cost =
VAR varLookup =
LOOKUPVALUE (
Lkup[Rate];
Lkup[StaffName]; AggrTbl[StaffName]
)
RETURN
IF (
varLookup <> BLANK();
varLookup;
50
)
Regards
Worked perfectly. Thank you so much.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |