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.
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
Solved! Go to Solution.
Dear Community Team, thank you for the replay & DAX. will try & update you
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.
@amksnpower There is an EDATE function in DAX as well as EOMONTH function as well.
User | Count |
---|---|
27 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
33 | |
13 | |
11 | |
9 | |
8 |