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

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

Reply
joshua1990
Post Prodigy
Post Prodigy

Calculated column with filter on 2 different tables

Hi experts!

I have a transactional table that shows me the sales for each article for each week.

Now I would like to get the number of orders for each article. This is stored in a different table. This I would like to add as a calculated column into the first table.

How can I add this value into the first table?

Would you do that with a CALCULATE(SUM(..), FILTER Calendar, Filter Order?

Or how would you do that?

4 REPLIES 4
FreemanZ
Super User
Super User

hi @joshua1990 

supposing two tables are related, typically it works like:

Column = COUNTROWS(RELATEDTABLE(OrderTable))

@FreemanZ : Thanks, but both tables are linked to a dimensional table that contains all articles and then also to a calendar. 

hi @joshua1990 

In your transaction table, what if you try to add a column like:

Column = 
VAR _article = TransactionTable[article]
RETURN
COUNTROWS( FILTER( OrderTable, OrderTable[article] = _article) )

 

tamerj1
Super User
Super User

@joshua1990 
It depends on your data model and relationships. Please share a screenshot or clarify.

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.