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
zubairs
Helper I
Helper I

Slicer selection - Cost allocation by department

Hi Guys,

 

I am creating a model where I have to allocate admin cost between two departments. So I have deparmtent mapping which allows me to create a slicer and look at the cost of each department individually. I have created measures through which I can see the allocated cost i.e. Sales Cost = (Sales+(50% Admin))

 

Now I want the same functionality through slicers. So when I select let's say Sales & Admin, the cost being shown in the pivot is the total cost. Whereas, I want to see "Total Sales cost" & "50% Admin cost".Current totalCurrent totalCurrent SalesCurrent SalesCurrent AdminCurrent AdminWhat it should beWhat it should be

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @zubairs ,

You can create a measure like this to calculate:

Re = 
VAR _sum =
    CALCULATE ( SUM ( 'Table'[Values] ), 'Table'[Department] = "KSA Sales" )
        + 0.5
            * CALCULATE ( SUM ( 'Table'[Values] ), 'Table'[Department] = "KSA Branch Admin" )
RETURN
    IF (
        HASONEVALUE ( 'Table'[CE mapping] ),
        [Last Year],
        IF ( HASONEFILTER ( 'Table'[Department] ), [Last Year], _sum )
    )

vyingjl_0-1644388627666.png

 

Best Regards,
Community Support Team _ Yingjie Li
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

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @zubairs ,

You can create a measure like this to calculate:

Re = 
VAR _sum =
    CALCULATE ( SUM ( 'Table'[Values] ), 'Table'[Department] = "KSA Sales" )
        + 0.5
            * CALCULATE ( SUM ( 'Table'[Values] ), 'Table'[Department] = "KSA Branch Admin" )
RETURN
    IF (
        HASONEVALUE ( 'Table'[CE mapping] ),
        [Last Year],
        IF ( HASONEFILTER ( 'Table'[Department] ), [Last Year], _sum )
    )

vyingjl_0-1644388627666.png

 

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

 

zubairs
Helper I
Helper I

Anybody please help. @AlexisOlson 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors