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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
amksnpower
New Member

Need Dax help

hi,

 

 I am having data from 2017 for claims. i need to do mature warranty calculation ( in Excel I use the Edate to get a back date based on that date will sum claims & divide by production to get mature warranty percentage) similar I need the Dax function to calculate the same.

 

Example: product supplies from Jan'2017. the warranty of the product is 15 months. if I want to calculate mature warranty 

July'23 - 15 months i.e. Apr'22. so will calculate the claim from Jan'2017 to Apr'22 & divide the supplies for the same period to get mature warranty percentage. is mean till Apr'22 supplies warranty is completed & we won't get claims.  pls help me to get the dax for the same

 

 

1 ACCEPTED SOLUTION

Dear Community Team, thank you for the replay & DAX. will try & update you

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @amksnpower ,

Please have a try.

Mature Warranty % =
VAR CurrentDate =
    TODAY ()
VAR WarrantyPeriod =
    15 - MAX ( table[change this to your desired warranty period in months ] )
VAR MatureDate =
    EDATE ( CurrentDate, - WarrantyPeriod )
VAR Claims =
    CALCULATE (
        SUM ( Claims[Amount] ),
        FILTER ( Claims, Claims[Date] <= MatureDate )
    )
VAR Supplies =
    CALCULATE (
        SUM ( Supplies[Quantity] ),
        FILTER ( Supplies, Supplies[Date] <= MatureDate )
    )
RETURN
    DIVIDE ( Claims, Supplies )

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Dear Community Team, thank you for the replay & DAX. will try & update you

Dear Bro,

 

it is working, I dynamically changed the Edate formula, claims, and supplies. Thank you.

 

need support as I made claims & supplies linked with the Date table to get the date common. but I cannot use that Date table, please help me with that. The date table created a relationship with claims and supplies.

Greg_Deckler
Super User
Super User

@amksnpower There is an EDATE function in DAX as well as EOMONTH function as well.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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