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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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