Dynamic segemenation. How to then split by a column?

gazpage

Active Member
Joined
Apr 17, 2015
Messages
393
I've used the Clustered Sales example from sqlbi (Dynamic Segmentation – DAX Patterns) to good effect. In my case, the properties is effectively the customer and UnitTape contains the sales.

Code:
OrigNumberOfPropertiesClustered = 
CALCULATE (
 [NumProperties],
    FILTER (
        ADDCOLUMNS (
            'Properties',
            "RankValue", CALCULATE (
                SUM ( UnitTape[Last Bank Appraisal Value (€)] ),
                CALCULATETABLE ( 'Properties' ),
                ALLSELECTED ()
            )
        ),
        COUNTROWS (
            FILTER (
                ValueSegment,
                [RankValue] > ValueSegment[Min]
                    && [RankValue] <= ValueSegment[Max]
            )
        )
            > 0
    )
)

This works perfectly. What I now want to do is take the resulting table and split the sales by type (a column in the UnitTape table). However, if I put a filter on the table then it dynamically recalculates the constituents. I suppose I really want to freeze the results of the second clause which determines which properties are included in which bucket, and then be able to segment.

I tried wrapping the [NumProperties] measure in another CALCULATE to apply a filter, but it didn't work.

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top