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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PabloGiraldo
Helper IV
Helper IV

Calculate Date difference if

Hi,

I have a matrix with unique rows. Each row goes through multiple steps (1 through 5). I would like to calculate the Date Difference betwen Today() and the "Started at" date, IF row is at step 5, otherwise leave blank or dont calculate anything.

 

Some rows might be on step 2 or 3, but once step 5 is shown on matrix, that's when i would like to calculate the datediff.

 

All the data i have are from Columns. I have not created any measures.

Thank you.Powerbi.png

1 ACCEPTED SOLUTION

@PabloGiraldo ,
Yes you can. Try below DAX in a new calculated measure:

Date_Difference = IF(MAX(submittalsacc_tasks[assigned to]) = "Ebuilder External System",DATEDIFF(TODAY(), MAX(Amazon[DATE]), DAY), BLANK())

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

@lbendlin please see link below for sample data. If you expand #2291 on matrix as seen in screenshot below, this item  has the example being at Step 5. I would like to create a measure with Date Diff from Today() and, in this example, September 20.Powerbi.pnghttps://walshgroup-my.sharepoint.com/:u:/p/pgiraldoclavijo/EVCCoratKVtFpVPC1Sw9WRABcicsjY5237yIp8fNj... 

Hi @PabloGiraldo ,
Try the below DAX in Calculated Measure:

Date_Difference = DATEDIFF(TODAY(), MAX(Table[DATE]), DAY)
 
PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

@Anand24 is it possible to do Date Diff IF submittalsacc_tasks[assigned to] = "Ebuilder External System.

I would like to use this on a card to show how many days the item has been in Ebuilder External System's side. Screenshot below shows my attempt at creating a measure of what i am looking for. Powerbi-2.png

@PabloGiraldo ,
Yes you can. Try below DAX in a new calculated measure:

Date_Difference = IF(MAX(submittalsacc_tasks[assigned to]) = "Ebuilder External System",DATEDIFF(TODAY(), MAX(Amazon[DATE]), DAY), BLANK())

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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