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])
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
72 | |
68 | |
41 | |
35 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
42 |