The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
77 | |
73 | |
47 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
56 |