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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
egrospe17
Frequent Visitor

Calculate a value based on Department using a measure instead of calculated column

Hello,

I've been trying to search this and figure it out but I can't seem to find the correct answer. I have two tables. 

 

(1) A list of Department

egrospe17_1-1715204456463.png

 

(2) A table of all of our budgeted hire and open requisitions by department

 

egrospe17_3-1715205333789.png

 

 

I need a count of Total Budget to Hire by department, as well as Total Open Requisition.

  • Total Budget to Hire is determined by the sum of "Budgeted Positions" and IF Req Type = "Budget".
  • Total Open Requisition is determined by the sum of "Number of Open Positions" and IF Req Type = "Open Requisition"

How do I accomplish this using a measure instead of a calculated column? The output I need is below

 

egrospe17_4-1715205490758.png

 

Thank you in advance!

 

 

 

2 ACCEPTED SOLUTIONS
egrospe17
Frequent Visitor

EDIT: Sorry, the Total Open Requisition for Project/Program Management is 7, not 6. 

View solution in original post

Anonymous
Not applicable

HI @egrospe17,

You can try to use following measure formulas if they suitable for your requirement:

Total Budget =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Budgeted Positions] ),
        FILTER ( ALLSELECTED ( Table1 ), [Department] IN list && [Req Type] = "Budget" )
    )

Total Open Requisition =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Number of Open Positions] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [Department]
                IN list
                    && [Req Type] = "Open Requisition"
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
egrospe17
Frequent Visitor

EDIT: Sorry, the Total Open Requisition for Project/Program Management is 7, not 6. 

Anonymous
Not applicable

HI @egrospe17,

You can try to use following measure formulas if they suitable for your requirement:

Total Budget =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Budgeted Positions] ),
        FILTER ( ALLSELECTED ( Table1 ), [Department] IN list && [Req Type] = "Budget" )
    )

Total Open Requisition =
VAR list =
    VALUES ( Department[Department] )
RETURN
    CALCULATE (
        SUM ( Table1[Number of Open Positions] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [Department]
                IN list
                    && [Req Type] = "Open Requisition"
        )
    )

Regards,

Xiaoxin Sheng

This worked and exactly what I needed! Thanks so much!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.