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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

How to compute duration for stock not moving ?

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Paulyeo11 , Try like, You can use AverageX in place sumx

Measure = sumx(values(INVC[Long desc]),CALCULATE(DATEDIFF(max(INVC[DATE_MOVE]),TODAY(),DAY)))

 

File attached after signature

View solution in original post

Anonymous
Not applicable

@Paulyeo11 Please create a column as below and add it to the visual- 

 

Column = DATEDIFF(INVC[DATE_MOVE],TODAY(),DAY)
 
NikhilKumar_0-1607139716356.png

 

View solution in original post

Anonymous
Not applicable

You need to create column not measure

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@Paulyeo11 Please create a column as below and add it to the visual- 

 

Column = DATEDIFF(INVC[DATE_MOVE],TODAY(),DAY)
 
NikhilKumar_0-1607139716356.png

 

Paulyeo11
Impactful Individual
Impactful Individual

Hi Nikh

 

When i try to implement the shorter expression , i am not able to locate Date field.

 

Paulyeo11_0-1607147015512.png

 

Anonymous
Not applicable

You need to create column not measure

Paulyeo11
Impactful Individual
Impactful Individual

Hi Nikhi

Your script is shorter.

Thank 

Paul

amitchandak
Super User
Super User

@Paulyeo11 , Try like, You can use AverageX in place sumx

Measure = sumx(values(INVC[Long desc]),CALCULATE(DATEDIFF(max(INVC[DATE_MOVE]),TODAY(),DAY)))

 

File attached after signature

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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