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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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