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
Anonymous
Not applicable

value changes over time

Hi all, I would like to be able to identfy customers where usage did not change in the last 3 days using either a column or measure. For example, I would like to be able to use a measure of column to say that customer B did not see a change in usage in the past 3 days as the usage stayed at 10. How would I do this?\

 

CustomerDateUsage
A3/20/215
A3/21/217
A3/22/218
B3/20/2110
B3/21/2110
B3/22/2110
2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link whether it is what you are looking for.

All measures are in the sample pbix file.

 

Picture2.png

 

https://www.dropbox.com/s/u8beudovko3yjku/jack421.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to my understanding, you want to compare the usage of each day in the first two days with the current day ,if the three values are the same, then set a flag like "Not changed",right?

 

Please try this measure:

Measure = 

var last2days= CALCULATE(MAX('Table'[Usage]),FILTER(ALL('Table'),'Table'[Customer]=MAX('Table'[Customer]) && 'Table'[Date]=MAX('Table'[Date])-2))

var last1days=
CALCULATE(MAX('Table'[Usage]),FILTER(ALL('Table'),'Table'[Customer]=MAX('Table'[Customer]) && 'Table'[Date]=MAX('Table'[Date])-1))

return 
IF(MAX('Table'[Usage])=last2days && MAX('Table'[Usage])=last1days,"Not changed","Changed")

The final output is shown below:

4.8.1.chang value.PNG

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to my understanding, you want to compare the usage of each day in the first two days with the current day ,if the three values are the same, then set a flag like "Not changed",right?

 

Please try this measure:

Measure = 

var last2days= CALCULATE(MAX('Table'[Usage]),FILTER(ALL('Table'),'Table'[Customer]=MAX('Table'[Customer]) && 'Table'[Date]=MAX('Table'[Date])-2))

var last1days=
CALCULATE(MAX('Table'[Usage]),FILTER(ALL('Table'),'Table'[Customer]=MAX('Table'[Customer]) && 'Table'[Date]=MAX('Table'[Date])-1))

return 
IF(MAX('Table'[Usage])=last2days && MAX('Table'[Usage])=last1days,"Not changed","Changed")

The final output is shown below:

4.8.1.chang value.PNG

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link whether it is what you are looking for.

All measures are in the sample pbix file.

 

Picture2.png

 

https://www.dropbox.com/s/u8beudovko3yjku/jack421.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.