Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hey guys!
I have some problems cause it`s first try to take some exp in PBI. So, I`ll be really greatful for help!
Task: I should count nums of order, for example we have first entry 12 and it`s - 1, second one - 2 and so on.
I`m trying to make it like that: counter = countrows(filter(database, [nums of order] = earlier([nums of order])))
But it`s not for me, cause that formula just count total value of entries. As I see its should be another one column like that:
Nums of order | Counter |
12 | 1 |
12 | 2 |
13 | 1 |
14 | 1 |
12 | 3 |
Danke!
Solved! Go to Solution.
@PBI_nick , with this data you will not be able to create a counter.
Add index column first
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
the try a new column
countX(filter(database, [nums of order] = earlier([nums of order]) &&[Index] <= earlier([Index]) ),[nums of order])
@PBI_nick , with this data you will not be able to create a counter.
Add index column first
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
the try a new column
countX(filter(database, [nums of order] = earlier([nums of order]) &&[Index] <= earlier([Index]) ),[nums of order])
It`s work! Thank you very much! Have a nice day 🙂
Can you please post some output data that you required ?
Proud to be a Super User!
Proud to be a Super User!
The main idea is show in the table. At the end i`ll have:
create_datetime | total sum (sum of orders) | nums of orders | counter |
some data | some data | 12 | 1 |
some data | some data | 12 | 2 |
Something like that if i understand u correctly. Doesnt show data in two first columns cause it neednt as I think
@PBI_nick
You need another column that can be used as an identifier for each row. Then, it will easy to differentiate each row in order to apply some ranking or count. Provide a valid data set to check.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
87 | |
82 | |
64 | |
49 |
User | Count |
---|---|
124 | |
110 | |
88 | |
68 | |
66 |