Forum Discussion
Merge 2 sets of data elements then subtract
- Anonymous5 years ago
Hi jonnyA ,
According to the prompt error:
It is found that it is a data type problem, you can check whether [Procedure_Code] is of Text type.
If it is of Text type, you can modify Admit Date and Discharge Dates to the following:
Admit Date = CALCULATE(MAX('Table'[DOS]),FILTER(ALL('Table'),'Table'[Procedure_Code] in {"99221","99222","99223"}&&'Table'[Patient_First_Name]=MAX('Table'[Patient_First_Name])))Discharge Dates = CALCULATE(MAX('Table'[DOS]),FILTER(ALL('Table'),'Table'[Procedure_Code] in {"99238","99239"}&&'Table'[Patient_First_Name]=MAX('Table'[Patient_First_Name])))Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years ago
Hi jonnyA ,
This is the same as above, it is a text type, you can change the function.
{99221,99222,99223}To {"99221","99222","99223"}
{99238,99239} changed to {"99238","99239"}
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi jonnyA ,
According to the prompt error:
It is found that it is a data type problem, you can check whether [Procedure_Code] is of Text type.
If it is of Text type, you can modify Admit Date and Discharge Dates to the following:
Admit Date =
CALCULATE(MAX('Table'[DOS]),FILTER(ALL('Table'),'Table'[Procedure_Code] in {"99221","99222","99223"}&&'Table'[Patient_First_Name]=MAX('Table'[Patient_First_Name])))Discharge Dates =
CALCULATE(MAX('Table'[DOS]),FILTER(ALL('Table'),'Table'[Procedure_Code] in {"99238","99239"}&&'Table'[Patient_First_Name]=MAX('Table'[Patient_First_Name])))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jonnyA5 years ago
Responsive Resident
Anonymous Thank you soooo much!!!!!!!!!!
- jonnyA4 years ago
Responsive Resident
Anonymous , do you know why this fromula is not working?
AR From Billed Claims = SUM('New_Demo_Charge_Dataset'[Balance]) - [AR Related To Credentialing]You have helped before wirth an issue similar so that is why i asm asking.Thank you in advance for your help!See below for error ...