Forum Discussion

mohan_g_das1986's avatar
mohan_g_das1986
Icon for Helper III rankHelper III
6 years ago
Solved

Create Segments for measure which is in %

I have a table of 50 accounts & their products. These accounts buy products from distributors & sell to end customers. i have to create a dashboard which products are selling good & whatnot. TotalS...
  • Fowmy's avatar
    Fowmy
    6 years ago

    mohan_g_das1986 

    Replace Column with this measure:

    Ratio_units = 
    DIVIDE(
        MAX('Table'[Sales Out]),
        MAX('Table'[From Disty])
    )

     
    Modified Measure:

    Measure = 
    VAR R = [Ratio_units]
    VAR BRACKET_MAX = SELECTEDVALUE('Ration Bracket'[Max])
    VAR BRACKET_MIN = SELECTEDVALUE('Ration Bracket'[Min])
    RETURN
    IF( 
        ISFILTERED('Ration Bracket'[Slab]),
        IF(
            R>=BRACKET_MIN &&
            R<BRACKET_MAX,
            1,
            0
        ),
        1
    )


    Ration Bracket Table:

     

    SlabSortMinMax
    -41% -1000%1-0.41-10
    -21% -040%2-0.21-0.4
    00% -020%30-0.2
    +00% 020%400.2
    +21% +040%50.210.4
    +41% +1000%60.4110