Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
cec71890
Frequent Visitor

COUNTROWS for warranty exposure counts

I need a formular for showing warranty exposure (historical and current).Here is what we have now: 

 

Rolling Exposure= CALCULATE(DISTINCTCOUNT(warrexposure[serialnumber]),DATESBETWEEN(calendar[date], STARTOFMONTH(calendar[date]),DATEADD(STARTOFMONTH(calendar[date]),10,YEAR)))) 

 

This formula is providing an accurate current exposure but the historical is inaccurate because it’s backfilling warranty start dates from future months into previous months because not all of the warranties last 10 full years. If that makes sense to anyone- please help ☺️ And just for clarification- when I say exposure, I mean we want to see a line chart showing the number of serial numbers under warranty on the first day of the month over 24 months. Our warranties last 18mo, 5 years, and 10 years.

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @cec71890 

 

Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.

 

Best Regards

cec71890
Frequent Visitor

This solution is close but only displays dates that fall w/in 12 or 18 months. Basically, I need to capture all the warranty start dates from STARTOFMONTH and end date is in the future (some will be 5 years, some will be 10 years.. etc..)

amitchandak
Super User
Super User

@cec71890 , with help from calendar/date table try like

 

Rolling 12 = CALCULATE(DISTINCTCOUNT(warrexposure[serialnumber]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

or

 

 

Rolling 18 = CALCULATE(DISTINCTCOUNT(warrexposure[serialnumber]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-18,MONTH))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.