Forum Discussion
Creating a new column that counts rows per month data from a different tables
Hi all,
I have three tables, REL, RE and Call Volumes. I am trying to create ttwo new column in the call volumes that shows a count of the number of REL and RE that occurred in that month/year.
The call volume table looks something like this:
| Date | No. Calls |
| May-25 | 62459.26 |
| Jun-25 | 64532.45 |
| Jul-25 | 56892.32 |
| Aug-25 | 84562.32 |
The RE and REL tables are like this:
REL
| ID | Creation Date | Description | Step Change Date |
| 2025-1234 | 30/08/2025 | Blah Blah Blach | 31/08/2025 |
| 2025-1235 | 29/08/2025 | Blah Blah Blach | 01/09/2025 |
| 2025-1236 | 28/08/2025 | Blah Blah Blach | 02/09/2025 |
| 2025-1237 | 27/08/2025 | Blah Blah Blach | 03/09/2025 |
| 2025-1238 | 26/08/2025 | Blah Blah Blach | 04/09/2025 |
| 2025-1239 | 31/07/2025 | Blah Blah Blach | 02/08/2025 |
| 2025-1240 | 30/07/2025 | Blah Blah Blach | 03/08/2025 |
| 2025-1241 | 29/07/2025 | Blah Blah Blach | 04/08/2025 |
| 2025-1242 | 28/07/2025 | Blah Blah Blach | 05/08/2025 |
| 2025-1243 | 27/07/2025 | Blah Blah Blach | 06/08/2025 |
| 2025-1244 | 26/07/2025 | Blah Blah Blach | 07/08/2025 |
| 2025-1245 | 25/07/2025 | Blah Blah Blach | 08/08/2025 |
| 2025-1246 | 24/07/2025 | Blah Blah Blach | 09/08/2025 |
| 2025-1247 | 23/07/2025 | Blah Blah Blach | 10/08/2025 |
| 2025-1248 | 22/07/2025 | Blah Blah Blach | 28/08/1935 |
| 2025-1249 | 21/07/2025 | Blah Blah Blach | 29/08/1935 |
| 2025-1250 | 27/06/2025 | Blah Blah Blach | 30/08/1935 |
| 2025-1251 | 26/06/2025 | Blah Blah Blach | 31/08/1935 |
| 2025-1252 | 25/06/2025 | Blah Blah Blach | 18/07/2025 |
| 2025-1253 | 24/06/2025 | Blah Blah Blach | 19/07/2025 |
| 2025-1254 | 23/06/2025 | Blah Blah Blach | 20/07/2025 |
| 2025-1255 | 22/06/2025 | Blah Blah Blach | 21/07/2025 |
| 2025-1256 | 21/06/2025 | Blah Blah Blach | 22/07/2025 |
| 2025-1257 | 20/06/2025 | Blah Blah Blach | 23/07/2025 |
| 2025-1258 | 19/06/2025 | Blah Blah Blach | 24/07/2025 |
| 2025-1259 | 26/05/2025 | Blah Blah Blach | 21/06/2025 |
| 2025-1260 | 25/05/2025 | Blah Blah Blach | 22/06/2025 |
| 2025-1261 | 24/05/2025 | Blah Blah Blach | 23/06/2025 |
| 2025-1262 | 23/05/2025 | Blah Blah Blach | 24/06/2025 |
| 2025-1263 | 22/05/2025 | Blah Blah Blach | 25/06/2025 |
| 2025-1264 | 21/05/2025 | Blah Blah Blach | 26/06/2025 |
| 2025-1265 | 20/05/2025 | Blah Blah Blach | 27/06/2025 |
| 2025-1266 | 19/05/2025 | Blah Blah Blach | 28/06/2025
|
REL:
| ID | Created | Description | Other | Other2 |
| 1536 | 30/08/2025 00:00 | Gibberish | Test | Text |
| 1536 | 29/08/2025 00:00 | Gibberish | Test | Text |
| 1536 | 28/08/2025 00:00 | Gibberish | Test | Text |
| 1536 | 27/08/2025 00:00 | Gibberish | Test | Text |
| 1536 | 26/08/2025 00:00 | Gibberish | Test | Text |
| 1536 | 31/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 30/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 29/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 28/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 27/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 26/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 25/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 24/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 23/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 22/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 21/07/2025 00:00 | Gibberish | Test | Text |
| 1536 | 27/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 26/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 25/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 24/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 23/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 22/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 21/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 20/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 19/06/2025 00:00 | Gibberish | Test | Text |
| 1536 | 26/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 25/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 24/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 23/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 22/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 21/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 20/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 19/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 18/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 17/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 16/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 15/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 14/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 13/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 12/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 11/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 10/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 09/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 08/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 07/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 06/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 05/05/2025 00:00 | Gibberish | Test | Text |
| 1536 | 04/05/2025 00:00 | Gibberish | Test | Text |
I'd like the call volume table to look like this for example (counts are incorrect)
| Date | No. Calls | Count RE | Count REL |
| May-25 | 62459.26 | 8 | 23 |
| Jun-25 | 64532.45 | 9 | 9 |
| Jul-25 | 56892.32 | 11 | 11 |
| Aug-25 | 84562.32 | 5 | 5 |
I think I may need to create new date columns as they are in different formats?
I've searched the forums and googled and asked AI and tried a few codes to no avail.
Ultimately what I'd like to do is create a line graph that shows how many REs and RELs we had per 1000 calls each month. So if you can help out with code to calculate that in a new column also that would be amazing.
I'm hoping it is possible!
Thank you all.
Hi Chamari
are you looking for an ouput similar to this ?
If this is what you are looking for, then you do not need to creating calculated columns, you can do it using only measures for the calculations. I had to create a measure for each requirement and also a date table. I also noticed that your dates are in European format, which could be the reason why you are having issues formatting them.
Please find attached a sample PBIX file I created for your reference.
6 Replies
- bhanu_gautam
Super User
Chamari Normalize date formats in all tables to a common Year-Month format.
Aggregate the RE and REL tables by month.
Join these aggregates to your Call Volumes table.
Calculate per 1000 calls metrics.Power Query Steps (recommended for date normalization):
In each table, add a new column for Year-Month:
Go to "Add Column" → "Custom Column" and use:= Date.ToText([DateColumn], "yyyy-MM")
Replace [DateColumn] with the actual date field in each table.
Assuming your tables are named CallVolumes, RE, and REL, and all have a YearMonth column:
-- Count RE per month
Count RE =
CALCULATE(
COUNTROWS(RE),
RE[YearMonth] = CallVolumes[YearMonth]
)-- Count REL per month
Count REL =
CALCULATE(
COUNTROWS(REL),
REL[YearMonth] = CallVolumes[YearMonth]
)-- REs per 1000 Calls
REs per 1000 Calls =
DIVIDE([Count RE], CallVolumes[No. Calls]) * 1000-- RELs per 1000 Calls
RELs per 1000 Calls =
DIVIDE([Count REL], CallVolumes[No. Calls]) * 1000- ChamariNew Member
Thank you so much for your quick reply.
I am getting stuck in a couple of places.
For the year month date part, the Date.ToText is not coming up as an option.
I ahve tried this one
Month_Year = FORMAT([Date],"mmm yyyy").But then I get stuck here:Assuming your tables are named CallVolumes, RE, and REL, and all have a YearMonth column:
-- Count RE per month
Count RE =
CALCULATE(
COUNTROWS(RE),
RE[YearMonth] = CallVolumes[YearMonth]
)The expression contains columns from multiple tables, but only columns from a single table can be used in a True/False expression that is used as a table filter expression.
- kushanNa
Super User
Hi Chamari
are you looking for an ouput similar to this ?
If this is what you are looking for, then you do not need to creating calculated columns, you can do it using only measures for the calculations. I had to create a measure for each requirement and also a date table. I also noticed that your dates are in European format, which could be the reason why you are having issues formatting them.
Please find attached a sample PBIX file I created for your reference.
- v-achippa
Community Support
Hi Chamari,
Thank you for reaching out to Microsoft Fabric Community.
Thank you bhanu_gautam and kushanNa for the prompt response.
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
- ChamariNew Member
Thank you everyone for helping.
I managed to adapt bhanu_gautam code to makeit work for my purpose:
CountREL = CALCULATE(COUNTROWS(REL), REL[YearMonthNumber])Thank you kushanNa also, I will look into this method also and see if it might be a suitable option.- v-achippa
Community Support
Hi Chamari,
Thank you for the response and confirming that the solution worked for you. I request you to please mark the post as Accept as Solution which helped you in resolving the issue, so that other community members who has similar issue will find it more easily.
Thanks and regards,
Anjan Kumar Chippa