Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am new to PowerBi and am struggling to create a simple query. I've created a two new columns as I want one to show a count of the 2023 and 2024 year from the column below, and the other column to show the a count of the remaining years in the column. But I just can't get the queries right, can anyone help please?
Solved! Go to Solution.
Hi @MissLilly ,
To do this in Power Query, you can select your [Next Review Date] column, go to the Home tab > Group By (or right-click on the column header and find 'Group By...'. The aggregation column should default to the Count operator which is fine. Hit OK and you'll have your years with a count of rows next to them.
However, depending on your exact scenario, this probably isn't something that should be done in Power Query. Calculating counts/averages/sums etc should really be done with DAX in Power BI (after applying your Power Query to the data model).
Pete
Proud to be a Datanaut!
Hi @MissLilly ,
To do this in Power Query, you can select your [Next Review Date] column, go to the Home tab > Group By (or right-click on the column header and find 'Group By...'. The aggregation column should default to the Count operator which is fine. Hit OK and you'll have your years with a count of rows next to them.
However, depending on your exact scenario, this probably isn't something that should be done in Power Query. Calculating counts/averages/sums etc should really be done with DAX in Power BI (after applying your Power Query to the data model).
Pete
Proud to be a Datanaut!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |