Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi I have a table that looks like the following:
Date | Barcode |
01/10/2018 | ABC123 |
02/10/2019 | DEF456 |
03/10/2020 | GHI789 |
04/10/2021 | JKL123 |
I want to add a column that which counts the number of barcodes where the year of the row in the date column is greater than the year of the date column in my current row?
So it would look something like this:
Date | Barcode | Count |
01/10/2018 | ABC123 | 3 |
02/10/2019 | DEF456 | 2 |
03/10/2020 | GHI789 | 1 |
04/10/2021 | JKL123 | 0 |
Thank you in advance!
Solved! Go to Solution.
@Anonymous , create a new column like
New column =
var _year = year([Date])
return
countx(filter(Table, year([Date])>_year),[barcode])
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |