Forum Discussion
YTD Measure
- Anonymous3 years ago
Hi spandy34 ,
Make sure that the date format in the function matches the date format used in your data model. In your case, it should be "04/01"
Please try:
CALCULATE ( DISTINCTCOUNT('INS_Main Claim Data'[ClaimRef]), FILTER ( 'INS_Main Claim Data', 'INS_Main Claim Data'[ClassOfBusinessCode] = "MV" && CONTAINSSTRINGEXACT ( [PolicyCode], "MV") && 'INS_Main Claim Data'[TypeCode] IN {"R1","R2"} ), DATESYTD('INS_Fin_Calendar Main Claim Data Payment Date'[Date], "04/01") )Or:
CALCULATE ( DISTINCTCOUNT('INS_Main Claim Data'[ClaimRef]), FILTER ( 'INS_Main Claim Data', 'INS_Main Claim Data'[ClassOfBusinessCode] = "MV" && CONTAINSSTRINGEXACT ( [PolicyCode], "MV") && 'INS_Main Claim Data'[TypeCode] IN {"R1","R2"} ), DATESYTD('INS_Fin_Calendar Main Claim Data Payment Date'[Date], "04-01") )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi,
Share the download link of the PBI file.
Hi there thank you for responding. I wont be able to share the link of the PBI file for security reasons.
Could you see any reason why the following wouldnt work? I placed the start date of the year and the data seems to work but I didnt want to get caught out if you felt there would be an issue with the next financial year . Please excuse my knowledge. I am quite new to Meausres
- Anonymous3 years agoNot applicable
Hi spandy34 ,
Make sure that the date format in the function matches the date format used in your data model. In your case, it should be "04/01"
Please try:
CALCULATE ( DISTINCTCOUNT('INS_Main Claim Data'[ClaimRef]), FILTER ( 'INS_Main Claim Data', 'INS_Main Claim Data'[ClassOfBusinessCode] = "MV" && CONTAINSSTRINGEXACT ( [PolicyCode], "MV") && 'INS_Main Claim Data'[TypeCode] IN {"R1","R2"} ), DATESYTD('INS_Fin_Calendar Main Claim Data Payment Date'[Date], "04/01") )Or:
CALCULATE ( DISTINCTCOUNT('INS_Main Claim Data'[ClaimRef]), FILTER ( 'INS_Main Claim Data', 'INS_Main Claim Data'[ClassOfBusinessCode] = "MV" && CONTAINSSTRINGEXACT ( [PolicyCode], "MV") && 'INS_Main Claim Data'[TypeCode] IN {"R1","R2"} ), DATESYTD('INS_Fin_Calendar Main Claim Data Payment Date'[Date], "04-01") )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum