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,
could someone help me? I'm trying to built a column in power query to count how many times have I made a sale and, most importantly, what sale (order by brand and date) was that. The image shows that the column "Previous Sale Count by Make" is what I'm having trouble with.
Solved! Go to Solution.
you mjust load you data and goes unde view/advance editors panel in PBI (I understood you use PBI, is it true?).
inside this panel cut and paste the lines of code you find in my post.
edit and modify so that you have a situation like this:
that is all.
a guess for the "hard" part only 😁
you have to add these lines after your lasta step and adapt the name of yourTab and other parameter as you like:
grp = Table.Group(yourTab, {"Make"}, {{"grpMake", each Table.AddIndexColumn(_, "Prev by Make", 0, 1)}}),
resulTab= Table.Sort(Table.ExpandTableColumn(grp, "grpMake", {"Model", "date", "Prev by Make"}),"date")
in
resulTab
Thanks for replying @Anonymous ,
unfortunately, I couldn't quite understand how to implement it, I believe I'm not that advanced in PBI yet. Could you please explain step-by-step how to implement it a little bit more, please?
you mjust load you data and goes unde view/advance editors panel in PBI (I understood you use PBI, is it true?).
inside this panel cut and paste the lines of code you find in my post.
edit and modify so that you have a situation like this:
that is all.
Thanks @Anonymous !
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 |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |