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 you're safe and doing well!
I'm trying to duplicate the max date row 4 times for each store ID.
For example-
Max date for Store name A is 4/21/2022. Now I want to duplicate this row 3 more times and this should work for each Store Name.
Input-
store_id | Store_Name | city | INVOICE_DATE | Sales_Amount | AOP_ADT |
S001 | A | MUMBAI | 4/16/2022 | 157507.18 | |
S001 | A | MUMBAI | 4/17/2022 | 132927.16 | |
S001 | A | MUMBAI | 4/18/2022 | 134101.77 | |
S001 | A | MUMBAI | 4/19/2022 | 137277.19 | |
S001 | A | MUMBAI | 4/20/2022 | 143295.75 | |
S001 | A | MUMBAI | 4/21/2022 | 44236.33 | |
S002 | C | MUMBAI | 1/1/2020 | 159357.66 | 277292 |
Expected Output-
store_id | Store_Name | city | INVOICE_DATE | Sales_Amount | AOP_ADT |
S001 | A | MUMBAI | 4/16/2022 | 157507.18 | |
S001 | A | MUMBAI | 4/17/2022 | 132927.16 | |
S001 | A | MUMBAI | 4/18/2022 | 134101.77 | |
S001 | A | MUMBAI | 4/19/2022 | 137277.19 | |
S001 | A | MUMBAI | 4/20/2022 | 143295.75 | |
S001 | A | MUMBAI | 4/21/2022 | 44236.33 | |
S001 | A | MUMBAI | 4/21/2022 | 44236.33 | |
S001 | A | MUMBAI | 4/21/2022 | 44236.33 | |
S001 | A | MUMBAI | 4/21/2022 | 44236.33 | |
S001 | A | MUMBAI | 4/21/2022 | 44236.33 | |
S002 | C | MUMBAI | 1/1/2020 | 159357.66 | 277292 |
Attached below are the sample data and the pbix file.
@amitchandakwill highly appreciate it if anyone can help me with this.
Thanks!
https://drive.google.com/drive/folders/1BKREgrynNKXWCWRBNruO8AXkg86L-Zgz?usp=sharing
Solved! Go to Solution.
Hi @Anany ,
In this case you need to use Power query and do the following:
Duplicate the Query that you have and then add the following steps after your transformations:
= Table.Max([ALL ROWS], "Index.INVOICE_DATE")
See result attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anany ,
In this case you need to use Power query and do the following:
Duplicate the Query that you have and then add the following steps after your transformations:
= Table.Max([ALL ROWS], "Index.INVOICE_DATE")
See result attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThank you so much !! It's working perfectly fine.
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 |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |