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
GraceTCL
Helper II
Helper II

Compare Total Platform vs Segment margins

Hi!

 

I am trying to compare the margins of the business segment vs the Total platform where the business segment is a subset of the Platform.

 

This comparison is intended via a waterfall chart.

 

When I filter for the segment on the waterfall chart visual, unfortunately, the platform is also filtered where "platform" = segment and the margins are the same.

 

This is despite the fact that I have computed the margins for the platform using CALCULATE and FILTER (for all segments) function while the margins for the segment is subjected to filtered conditions.

 

Could you let me know if above comparison is feasible through a single visual and if so, what can I do to achieve above outcomes?

 

To elaborate more on my problem above. I think one hypothesis might be that my formula for getting sum of platform is not independent of filter conditions.

 

Using this hypothetical eg where:

Table and info as per screenshot:

Segment.PNG

 

My dax formula:

Revenue_measure = sum('Sales'[Revenue])

Platform_Revenue = CALCULATE([Revenue_measure],'Sales'[Platform]="A")

 

When I filter for Segment AD, unfortunately, Platform_revenue = "AD" and not Sum of "A".

 

Pls help to advise how should I correct my formula. Thanks!

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@GraceTCL,

 

Try these measures:

 

Sum Profit = SUM ( Sales[Profit] )

Sum Revenue = SUM ( Sales[Revenue] )

Margin Segment vs Platform = 
VAR vSegmentMargin =
    DIVIDE ( [Sum Profit], [Sum Revenue] )
VAR vPlatformProfit =
    CALCULATE ( [Sum Profit], ALL ( Sales[Segment] ), VALUES ( Sales[Platform] ) )
VAR vPlatformRevenue =
    CALCULATE ( [Sum Revenue], ALL ( Sales[Segment] ), VALUES ( Sales[Platform] ) )
VAR vPlatformMargin =
    DIVIDE ( vPlatformProfit, vPlatformRevenue )
VAR vResult = vSegmentMargin - vPlatformMargin
RETURN
    vResult

 

DataInsights_0-1619014971939.png

You were on the right track with the Platform_Revenue measure, but it needs to be dynamic. This is achieved with the CALCULATE filter "VALUES ( Sales[Platform] )".





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@GraceTCL,

 

Try these measures:

 

Sum Profit = SUM ( Sales[Profit] )

Sum Revenue = SUM ( Sales[Revenue] )

Margin Segment vs Platform = 
VAR vSegmentMargin =
    DIVIDE ( [Sum Profit], [Sum Revenue] )
VAR vPlatformProfit =
    CALCULATE ( [Sum Profit], ALL ( Sales[Segment] ), VALUES ( Sales[Platform] ) )
VAR vPlatformRevenue =
    CALCULATE ( [Sum Revenue], ALL ( Sales[Segment] ), VALUES ( Sales[Platform] ) )
VAR vPlatformMargin =
    DIVIDE ( vPlatformProfit, vPlatformRevenue )
VAR vResult = vSegmentMargin - vPlatformMargin
RETURN
    vResult

 

DataInsights_0-1619014971939.png

You were on the right track with the Platform_Revenue measure, but it needs to be dynamic. This is achieved with the CALCULATE filter "VALUES ( Sales[Platform] )".





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.