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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PeterStuhr
Helper V
Helper V

Counting Revenue For Companies and only count budget for some

Hi all,

 

I have kind of a complex problem.

 

We have the following tables:

 

Account Manager Table:

 

Account ManagerOffice
Anders AndersenDenmark
Peter PetersenEnglang
Mads MadsenSweden

 

 

Order Intake Table:

 

CompanyOfficeAccount ManagerRevenue
ADenmarkAnders Andersen10000
BDenmarkAnders Andersen10000
CDenmarkAnders Andersen10000
DEnglangPeter Petersen10000
EEnglangPeter Petersen10000
FSwedenAnders Andersen10000
GSwedenMads Madsen10000
HSwedenMads Madsen10000
ISwedenMads Madsen10000

 

Budget Table:

 

CompanyOfficeBudget
ADenmark20000
BDenmark20000
CDenmark20000
DEnglang20000
EEnglang20000
FSweden20000
GSweden20000
HSweden20000
ISweden20000

 

I have set up a visual showing, dependent on the office selected:

 

Order Intake and budget.

 

If selecting Sweden, I would like to see:

 

Order Intake for aompany FGHI, but only compare to sum of Budget for Mads' accounts. Right now, I am also seeing budget for Anders, since he has a single account in Sweden. In our company we have 1000s of accounts - and sometimes an account manager has a single account for another Office than his own. Which is alright - that is revenue owned by the office. But we dont want his budgets to count as well. if that makes sense.

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @PeterStuhr 

You may link the three tables first.Then create two measures as below to get the sum.

SUM_Revenue =
CALCULATE (
    SUM ( 'Order Intake'[Revenue] ),
    FILTER (
        'Order Intake',
        'Order Intake'[Account Manager]
            = SELECTEDVALUE ( 'Account Manager'[Account Manager] )
    )
)
SUM_Budget = CALCULATE(SUM(Budget[Budget]),FILTER('Order Intake','Order Intake'[Account Manager]=SELECTEDVALUE('Account Manager'[Account Manager])))

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @PeterStuhr 

You may link the three tables first.Then create two measures as below to get the sum.

SUM_Revenue =
CALCULATE (
    SUM ( 'Order Intake'[Revenue] ),
    FILTER (
        'Order Intake',
        'Order Intake'[Account Manager]
            = SELECTEDVALUE ( 'Account Manager'[Account Manager] )
    )
)
SUM_Budget = CALCULATE(SUM(Budget[Budget]),FILTER('Order Intake','Order Intake'[Account Manager]=SELECTEDVALUE('Account Manager'[Account Manager])))

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.