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
analyticsforall
Frequent Visitor

how to get calculated column with sum by region in one table by another

Hello! 

I'm really stucked on this subject, hope someone could help (: 

 

Here is a pbix file https://drive.google.com/file/d/1MUH1ZiFLKCyyNO5fNRDOunY2GAA_vHjY/view?usp=sharing

 

The question is:

I have 2 tables: PnL and PnL by regions.

Both of them have 2 connections: with calendar and PnL mapping.

 

In table PnL by regions a have a calculated column called "CIS Rev1", where I need to see all sum from PnL table by same month and year for this region.

For example, for jan 2021 there should ne value per each row = 542 262, but I have only value for 1 day of jan 2021.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the attached file, if it suits your requirement.

I fixed the DAX formula of the calculated column.

 

 

CIS Rev1 =
VAR CurYear = 'Pnl by Regions'[Year]
VAR CurMonth = 'Pnl by Regions'[Month]
RETURN
    SUMX (
        FILTER (
            PnL,
            PnL[PNL name] = "CIS"
                && PnL[Year] = CurYear
                && PnL[Month] = CurMonth
        ),
        PnL[Amount USD]
    )

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the attached file, if it suits your requirement.

I fixed the DAX formula of the calculated column.

 

 

CIS Rev1 =
VAR CurYear = 'Pnl by Regions'[Year]
VAR CurMonth = 'Pnl by Regions'[Month]
RETURN
    SUMX (
        FILTER (
            PnL,
            PnL[PNL name] = "CIS"
                && PnL[Year] = CurYear
                && PnL[Month] = CurMonth
        ),
        PnL[Amount USD]
    )

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

@Jihwan_Kim this is exactly what I needed!) Thank you! 🤗

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.