Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I'm trying to calculate all claims against a contract.
There are two tables contract & claims.
Contract have two columns to identify the contract i.e. Contract_No & AMC_No
In the claims table there is only Contract_No against which right AMC_No is required.
For e.g, AMC_NO "A" ranges from 1st januray to 10th januray.
A contract should have first two claims dated 2nd & 9th january i.e. the total amount is 300.
May be there is some way to put a "for" loop or something of that sort.
Any help is highly appreciated!!!!! 🙂
Please feel free to post any further doubt in the problem.
Regards,
Saurabh Kedia
Please refer both the screenshot below:
Solved! Go to Solution.
Ok...lets add one more argument in FILTER.
Try this
Desired Output =
CALCULATE (
FIRSTNONBLANK ( Contract[AMC_No], 1 ),
FILTER (
Contract,
Claims[Claim_Date] >= Contract[Start_Date]
&& Claims[Claim_Date] <= Contract[End_Date]
&& Claims[Contract_No] = Contract[Contract_No]
)
)
Try this Column
Desired Output =
CALCULATE (
FIRSTNONBLANK ( Contract[AMC_No], 1 ),
FILTER (
Contract,
Claims[Claim_Date] >= Contract[Start_Date]
&& Claims[Claim_Date] <= Contract[End_Date]
)
)
Hi Zubair,
Thanks for your input! 🙂
Actually there are many contracts, I mean in the sample which I posted only have one contract but there are many contracts with over lapping contract duration. I tried your solution..it works perfectly fine with one contract but there is some issue when there are multiple contracts.
Please feel free to raise any doubts on the dataset or the query.
I've attached the sample data set, please refer the screenshot below:
Regards,
Saurabh Kedia
Ok...lets add one more argument in FILTER.
Try this
Desired Output =
CALCULATE (
FIRSTNONBLANK ( Contract[AMC_No], 1 ),
FILTER (
Contract,
Claims[Claim_Date] >= Contract[Start_Date]
&& Claims[Claim_Date] <= Contract[End_Date]
&& Claims[Contract_No] = Contract[Contract_No]
)
)
Hi Zubair,
Thanks a lot! 🙂
Highly appreciated.
Regards,
Saurabh Kedia
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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |