This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi everyone,
I am still pretty new in Power BI but I am having trouble creating a matrix visualization based on this table:
The idea should look like this
I was able to extract the years however I cannot add the count of codes for the columns. Can you help me figure out the possible solution for this?
Solved! Go to Solution.
In the "Rows" box drag the "Geocity" field
In the "Columns" box put the "EnrolementYear" field
In the "Values" box put the "Code" BUT then right click on it and choose "Count".
Apologies if that's what you've already tried. If so, perhaps you could explain a little more or provide some sample data.
In the "Rows" box drag the "Geocity" field
In the "Columns" box put the "EnrolementYear" field
In the "Values" box put the "Code" BUT then right click on it and choose "Count".
Apologies if that's what you've already tried. If so, perhaps you could explain a little more or provide some sample data.
Hi @PijushRoy
Here's the sample data
CodeGeoCityEnrolmentYear
| fr109 | Rennes | 2003-2004 |
| fi016 | Tampere | 2019-2020 |
| fi017 | Helsinki | 2021-2022 |
| fi212 | Espoo | 2021-2022 |
| fi033 | Helsinki | 0 |
| fi034 | Helsinki | 2021-2022 |
| fi036 | Helsinki | 2021-2022 |
| fi041 | Kuopio | 2021-2022 |
| bo008 | Santa Cruz | 2021-2022 |
| bo008 | Santa Cruz | 2021-2022 |
| bo008 | Santa Cruz | 2021-2022 |
| bo008 | Santa Cruz | 2021-2022 |
| at034 | Vienna | 2021-2022 |
| ar103 | Buenos Aires | 2019-2020 |
| ar103 | Buenos Aires | 2019-2020 |
| ar103 | Buenos Aires | 2019-2020 |
| ar103 | Buenos Aires | 2019-2020 |
If you want to display the number of codes by city and year you can do this:
Add the year field to the Columns and the city field in the Rows. Then in the Values you can add DAX measure like this:
Count_of_code = COUNTROWS(Code)
Please share (copy and paste) sample data
Proud to be a Super User! | |
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 25 | |
| 24 |