Forum Discussion

Konrad_Schargel's avatar
Konrad_Schargel
Frequent Visitor
1 year ago
Solved

Dynamic segmentation based on the growth

Hi all, 


I checked a lot of topics similars than the problem I have but I couldn't find any solution. 

I am creating a page to analyse the product performance by territory for a selected cycle.

So, I want to use a scatter chart where I want to display the Market Share growth and the sales. I don't have problems in create the measures. 

The problem is that I have a large list of territories and I would like to create a dynamic segmentation with growths ranges. 
The idea is use a slicer with ranges and if I don't have any range selected show all the territories but if I select the range 0-10%, show only the territories with growth between these two values. 

The range table should be like the following. 

 

RangeLower LimitUpper LimitOrder

< 0% 01
0-5 %00,052
5-20 %0,050,23
20-50%0,20,54
50-70%0,50,75
70-100%0,716
> 100%1 7

 

Thank you very much

Regards 

 

 

 

  • Hi Konrad_Schargel ,

     

    For this you need to add a measure to filter out the data based on the growth.

     

    Create the following measure:

    Filter Ranges = var temptable = FILTER('Table (2)', 'Table (2)'[Lower] <= [Growth % Total] && 'Table (2)'[Upper] >= [Growth % Total])
    
    return
    
    COUNTROWS(temptable)

    Now add this measure into the filter of the visual, and select he is not blank option:

     

     

     

     

     

4 Replies

  • Hi Konrad_Schargel ,

     

    For this you need to add a measure to filter out the data based on the growth.

     

    Create the following measure:

    Filter Ranges = var temptable = FILTER('Table (2)', 'Table (2)'[Lower] <= [Growth % Total] && 'Table (2)'[Upper] >= [Growth % Total])
    
    return
    
    COUNTROWS(temptable)

    Now add this measure into the filter of the visual, and select he is not blank option:

     

     

     

     

     

  • Konrad_Schargel 

    Create a measure:

    IsInSelectedRange =
    VAR SelectedLowerLimit = SELECTEDVALUE(RangeTable[Lower Limit])
    VAR SelectedUpperLimit = SELECTEDVALUE(RangeTable[Upper Limit])
    VAR CurrentGrowth = [MarketShareGrowth]

    RETURN
    IF (
    ISBLANK(SelectedLowerLimit) && ISBLANK(SelectedUpperLimit),
    TRUE, // Show all if no range is selected
    CurrentGrowth >= SelectedLowerLimit && (ISBLANK(SelectedUpperLimit) || CurrentGrowth < SelectedUpperLimit)
    )

    Apply the Measure as a Visual Level Filter to show items when the measure is TRUE.

    💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
    Cheers,
    Kedar
    Connect on LinkedIn