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
SWAL
New Member

Value based on filter DAX

Dear all

 

Thank you for the great work in this Forum. I have learned the ins and out of BI.

 

I have a problem with calculation a date based on a "Product Name" in dax and don't seem to be find a solution. I have tried IF, SUM, SUMX and Filter, Calculate etc an cannot hack this one to be repatative. So, Please help me to see where I am going wrong . . . here is an example of what I am looking for

 

Product NameDateFuture Calculated Date

Orange  

04/01/2022  (+15)(=) 04/15/2022

Apple

04/01/2022  (+10)(=) 04/10/2022

Orange

04/01/2022  (+15)(=) 04/15/2022
Pear04/01/2022  (+5) etc(=) 04/05/2022

 

Basically I need to Define the "Product Name" then Calculate the "Date" to a "Future Calculated Date" to be displayed in a Table in Power BI Repetatively

 

Thank you in advance and Kind Regards

1 ACCEPTED SOLUTION
SWAL
New Member

Hi All

 

I have manager to resolve the problem  as follows:

 

Measure =
IF(MAX('Product'[Product Name])="Orange",'Data'[ProdDate]+15,
IF(MAX('Product'[Product Name])="Audio",'Data'[ProdDate]+10,
IF(MAX('Product'[Product Name])="Awake!",'Data'[ProdDate]+5)))
 
How this will be useful
 
 

View solution in original post

2 REPLIES 2
SWAL
New Member

Hi All

 

I have manager to resolve the problem  as follows:

 

Measure =
IF(MAX('Product'[Product Name])="Orange",'Data'[ProdDate]+15,
IF(MAX('Product'[Product Name])="Audio",'Data'[ProdDate]+10,
IF(MAX('Product'[Product Name])="Awake!",'Data'[ProdDate]+5)))
 
How this will be useful
 
 
SWAL
New Member

Turns this but it has a glitsh in that only uses the first VALUE

 

Measure = CALCULATE(
SWITCH(FALSE(),
VALUES('Product'[Product Name]) = "Orange", sum('Product'[Date]) +15,
VALUES('Product'[Product Name]) = "Apple", sum('Product'[Date]) +10 ))

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.