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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors