The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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" ) )