Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
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 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 6 | |
| 5 |