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,
Hope everyone is well. I am trying to achieve a solution similar to the above thread but using Power Query instead of DAX. I have appended multiple extracts of the same data in the same structure. Each extract has a timestamp column displaying the extraction date.
I want to create a custom column using Power Query which displays the same value but for the previous month. Example below:
Best regards,
Ami
Solved! Go to Solution.
Hi @amikhan12345 ,
you must group on "Customer" and return all values from your table. Then a apply a function that returns the previous row value like so: Fast and easy way to reference previous or next rows in Power Query or Power BI – The BIccountant
If you need help applying this, please paste sample data that can easily used like described here:
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Thank you @amitchandak and thank you @ImkeF for the Power Query solution. The additional video on your website on was very helpful.
Hi @amikhan12345 ,
you must group on "Customer" and return all values from your table. Then a apply a function that returns the previous row value like so: Fast and easy way to reference previous or next rows in Power Query or Power BI – The BIccountant
If you need help applying this, please paste sample data that can easily used like described here:
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
@ImkeF , Can you help on this.
@amikhan12345 , check with M experts . In Dax code can be
var _max = maxx(filter(Table,[customer] =earlier([customer) && [recorded timestamp] <earlier([recorded timestamp]) ),[recorded timestamp])
return
maxx(filter(Table,[customer] =earlier([customer) && [recorded timestamp] =_max ),[status])
Hi @amitchandak
I am trying to implement this formula as a DAX calculated column but the formula is not returning any fields for Customer. When you have a moment could you refine the syntax for me? (I appreciate you probably improvised this measure as an example)
Ami
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |