Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Guys,
I want to make a calculated column of who should have approved an invoice, so that I can compare it with who actually approved it.
The tables look like this:
Workflow:
Invoices:
When the Invoice Amount is >= than workflow minimal amount. All the employees uptil that point have to approve it. The output should be like this:
So that eventually I could compare who should've approved and who did approve and get the final table:
Solved! Go to Solution.
Hey @HBL_Nick ,
I thought you want the first one that would be allowed 😉
Then try the following measure:
Responsible Approver =
VAR vWorkflowID = Invoices[Workflow]
VAR vAmount = Invoices[Amount]
VAR vTable =
CALCULATETABLE(
Workflow,
Workflow[WorkflowID] = vWorkflowID,
Workflow[MinimalAmount] <= vAmount
)
RETURN
CONCATENATEX(
vTable,
Workflow[Approver],
", "
)
Hey @HBL_Nick ,
the following calculated column should give you the right Approver:
Responsible Approver =
VAR vWorkflowID = Invoices[Workflow]
VAR vAmount = Invoices[Amount]
VAR vTable =
CALCULATETABLE (
Workflow,
Workflow[WorkflowID] = vWorkflowID,
Workflow[MinimalAmount] <= vAmount
)
VAR vFilteredTable =
FILTER (
vTable,
Workflow[MinimalAmount] = MAXX ( vTable, Workflow[MinimalAmount] )
)
RETURN
MAXX ( vFilteredTable, Workflow[Approver] )
Hi @selimovd, thanks for helping me out 🙂 This is almost the answer to my question, the only thing is: with this answer, I will find the last approver of the workflow / invoice, but I actually would like a list of approvers of the invoice / workflow. For example: an invoice with workflow 1 and a amount of 800, 2 people Should have approved. So the calculated column should contain: "Peter, James". Now it will only contain: "James".
Hey @HBL_Nick ,
I thought you want the first one that would be allowed 😉
Then try the following measure:
Responsible Approver =
VAR vWorkflowID = Invoices[Workflow]
VAR vAmount = Invoices[Amount]
VAR vTable =
CALCULATETABLE(
Workflow,
Workflow[WorkflowID] = vWorkflowID,
Workflow[MinimalAmount] <= vAmount
)
RETURN
CONCATENATEX(
vTable,
Workflow[Approver],
", "
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |