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.
Hello,
I have some data in which I have brought back MAX visit dates from a SQL database into powerBI. Column a which would be report week so all the data is in a is marked the same date. Column B is the client id. Column C is the Maximum visit date of each client, each client can possibly be visited more than once in a week.
I want to build a custom column to allow me to show the previous visit date to the maximum date in column C.
Can anyone help me on how to do this?
Thanks all
Solved! Go to Solution.
Column A Column B Column C Desired output
13/12/2020 15616 12/12/2020 09/12/2020
13/12/2020 16515 10/12/2020 10/12/2020
13/12/2020 15688 10/12/2020 10/12/2020
13/12/2020 11111 09/12/2020 08/12/2020
13/12/2020 15616 09/12/2020 09/12/2020
13/12/2020 11111 08/12/2020 08/12/2020
I hope this helps? @HotChilli
Hi @jaltoft
I use your sample to have a test.
Calculated column:
Previous date = MINX(FILTER('Table','Table'[Column B]=EARLIER('Table'[Column B])),'Table'[Column C ])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you provide a small data sample (not a picture) please and show the desired output?
I'm sure someone can help
Column A Column B Column C Desired output
13/12/2020 15616 12/12/2020 09/12/2020
13/12/2020 16515 10/12/2020 10/12/2020
13/12/2020 15688 10/12/2020 10/12/2020
13/12/2020 11111 09/12/2020 08/12/2020
13/12/2020 15616 09/12/2020 09/12/2020
13/12/2020 11111 08/12/2020 08/12/2020
I hope this helps? @HotChilli
Hi @jaltoft
I use your sample to have a test.
Calculated column:
Previous date = MINX(FILTER('Table','Table'[Column B]=EARLIER('Table'[Column B])),'Table'[Column C ])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |