Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am trying to create a custom column where it will return a the ClaimData[PlanYear] when HPP_Finance_All[PaidMonth] is between ClaimData[PlanYearStart] and ClamData[PlanYearEnd]. Another clause of the column needs to include where the HPP_Finance_All[GroupID] = ClaimData[GroupID].
Can you please assist?
Solved! Go to Solution.
Hi @AW1976NOVA
I build a sample to have a test.
ClaimData Table:
HPP_Finance_All Table:
Create a custom column by M query.
let
_CurrentID = [GroupID], _Month = [PaidMonth]
in
Table.SelectRows(ClaimData, each _[GroupID] = _CurrentID
and _[PlanYearStart] <= _Month and _[PlanYearEnd]>=_Month){0}[PlanYear]
If there is no PlanYear match from ClaimData, it will show error.
So we need to replace error and get final result.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AW1976NOVA
I build a sample to have a test.
ClaimData Table:
HPP_Finance_All Table:
Create a custom column by M query.
let
_CurrentID = [GroupID], _Month = [PaidMonth]
in
Table.SelectRows(ClaimData, each _[GroupID] = _CurrentID
and _[PlanYearStart] <= _Month and _[PlanYearEnd]>=_Month){0}[PlanYear]
If there is no PlanYear match from ClaimData, it will show error.
So we need to replace error and get final result.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@AW1976NOVA Maybe Lookup Range: LOOKUPVALUE Range - Microsoft Power BI Community
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
96 | |
80 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |