Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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!
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |