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.
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?\
Customer | Date | Usage |
A | 3/20/21 | 5 |
A | 3/21/21 | 7 |
A | 3/22/21 | 8 |
B | 3/20/21 | 10 |
B | 3/21/21 | 10 |
B | 3/22/21 | 10 |
Solved! Go to Solution.
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.
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.
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:
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.
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:
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.
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |