Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello, I'm really strugging with a dax expression that seems like it should be fairly simple.
I have a table of Insurance Policies, 1 row for each policy. Each row has a POLICYSTARTDATE and POLICYENDDATE.
I want to show a daily/monthly count of Live policies, ie choose a date and display the number of rows for which that date falls within POLICYSTARTDATE and POLICYENDDATE.
Any help greatly appreciated.
Hi @PowerPaddy,
Check this Post the answer should by preety similar to what I gave.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português
Try this measure
Adjust the mydate according to your needs. You can link it to a slicer as well
Measure = VAR mydate = DATE ( 2017, 1, 22 ) RETURN COUNTROWS ( FILTER ( ADDCOLUMNS ( TableName, "Live/Dead", IF ( mydate >= TableName[Policy Start Date] && mydate <= TableName[Policy End Date], "Live", "Dead" ) ), [Live/Dead] = "Live" ) )