Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Chamari
New Member

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:

DateNo. Calls
May-2562459.26
Jun-2564532.45
Jul-2556892.32
Aug-2584562.32

 

The RE and REL tables are like this:

REL

IDCreation DateDescriptionStep Change Date
2025-123430/08/2025Blah Blah Blach31/08/2025
2025-123529/08/2025Blah Blah Blach01/09/2025
2025-123628/08/2025Blah Blah Blach02/09/2025
2025-123727/08/2025Blah Blah Blach03/09/2025
2025-123826/08/2025Blah Blah Blach04/09/2025
2025-123931/07/2025Blah Blah Blach02/08/2025
2025-124030/07/2025Blah Blah Blach03/08/2025
2025-124129/07/2025Blah Blah Blach04/08/2025
2025-124228/07/2025Blah Blah Blach05/08/2025
2025-124327/07/2025Blah Blah Blach06/08/2025
2025-124426/07/2025Blah Blah Blach07/08/2025
2025-124525/07/2025Blah Blah Blach08/08/2025
2025-124624/07/2025Blah Blah Blach09/08/2025
2025-124723/07/2025Blah Blah Blach10/08/2025
2025-124822/07/2025Blah Blah Blach28/08/1935
2025-124921/07/2025Blah Blah Blach29/08/1935
2025-125027/06/2025Blah Blah Blach30/08/1935
2025-125126/06/2025Blah Blah Blach31/08/1935
2025-125225/06/2025Blah Blah Blach18/07/2025
2025-125324/06/2025Blah Blah Blach19/07/2025
2025-125423/06/2025Blah Blah Blach20/07/2025
2025-125522/06/2025Blah Blah Blach21/07/2025
2025-125621/06/2025Blah Blah Blach22/07/2025
2025-125720/06/2025Blah Blah Blach23/07/2025
2025-125819/06/2025Blah Blah Blach24/07/2025
2025-125926/05/2025Blah Blah Blach21/06/2025
2025-126025/05/2025Blah Blah Blach22/06/2025
2025-126124/05/2025Blah Blah Blach23/06/2025
2025-126223/05/2025Blah Blah Blach24/06/2025
2025-126322/05/2025Blah Blah Blach25/06/2025
2025-126421/05/2025Blah Blah Blach26/06/2025
2025-126520/05/2025Blah Blah Blach27/06/2025
2025-126619/05/2025Blah Blah Blach

28/06/2025

 

 

REL:

IDCreatedDescriptionOtherOther2
153630/08/2025 00:00GibberishTestText
153629/08/2025 00:00GibberishTestText
153628/08/2025 00:00GibberishTestText
153627/08/2025 00:00GibberishTestText
153626/08/2025 00:00GibberishTestText
153631/07/2025 00:00GibberishTestText
153630/07/2025 00:00GibberishTestText
153629/07/2025 00:00GibberishTestText
153628/07/2025 00:00GibberishTestText
153627/07/2025 00:00GibberishTestText
153626/07/2025 00:00GibberishTestText
153625/07/2025 00:00GibberishTestText
153624/07/2025 00:00GibberishTestText
153623/07/2025 00:00GibberishTestText
153622/07/2025 00:00GibberishTestText
153621/07/2025 00:00GibberishTestText
153627/06/2025 00:00GibberishTestText
153626/06/2025 00:00GibberishTestText
153625/06/2025 00:00GibberishTestText
153624/06/2025 00:00GibberishTestText
153623/06/2025 00:00GibberishTestText
153622/06/2025 00:00GibberishTestText
153621/06/2025 00:00GibberishTestText
153620/06/2025 00:00GibberishTestText
153619/06/2025 00:00GibberishTestText
153626/05/2025 00:00GibberishTestText
153625/05/2025 00:00GibberishTestText
153624/05/2025 00:00GibberishTestText
153623/05/2025 00:00GibberishTestText
153622/05/2025 00:00GibberishTestText
153621/05/2025 00:00GibberishTestText
153620/05/2025 00:00GibberishTestText
153619/05/2025 00:00GibberishTestText
153618/05/2025 00:00GibberishTestText
153617/05/2025 00:00GibberishTestText
153616/05/2025 00:00GibberishTestText
153615/05/2025 00:00GibberishTestText
153614/05/2025 00:00GibberishTestText
153613/05/2025 00:00GibberishTestText
153612/05/2025 00:00GibberishTestText
153611/05/2025 00:00GibberishTestText
153610/05/2025 00:00GibberishTestText
153609/05/2025 00:00GibberishTestText
153608/05/2025 00:00GibberishTestText
153607/05/2025 00:00GibberishTestText
153606/05/2025 00:00GibberishTestText
153605/05/2025 00:00GibberishTestText
153604/05/2025 00:00GibberishTestText

 

I'd like the call volume table to look like this for example (counts are incorrect)

DateNo. CallsCount RE Count REL
May-2562459.26823
Jun-2564532.4599
Jul-2556892.321111
Aug-2584562.3255

 

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.

 

1 ACCEPTED SOLUTION
kushanNa
Super User
Super User

Hi @Chamari 

 

are you looking for an ouput similar to this ? 

kushanNa_0-1759133607945.png

 

 

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.

View solution in original post

6 REPLIES 6
v-achippa
Community Support
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

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.

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

kushanNa
Super User
Super User

Hi @Chamari 

 

are you looking for an ouput similar to this ? 

kushanNa_0-1759133607945.png

 

 

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.

bhanu_gautam
Super User
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




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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]
)

 

Chamari_0-1758884303925.png

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.

 

Chamari_1-1758884568445.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors