Forum Discussion

eburke's avatar
eburke
Icon for Helper II rankHelper II
8 years ago
Solved

Multiplying no. of level by level value

Ok I'm stumped, I feel like I should know this and it should be simple but for some reason I can't get this to work.  I have two tables, one has a list of clients and each has an assigned level.  The...
  • v-jiascu-msft's avatar
    8 years ago

    Hi eburke,

     

    There are two approaches. The measure could be the one below.

    Measure = COUNT('Client Contracts (CC1936)'[Program Level]) * min(Table2[Value])

    1. Use the Levels from table Client Contracts (CC1936) and change the Cross filter direction to Both.

    2. Use the Levels from table Table2. 

    You can try it out in this file.

    Multiplying_no_of_level_by_level_value1

    Multiplying_no_of_level_by_level_value2

     

    Best Regards,

    Dale

  • v-jiascu-msft's avatar
    v-jiascu-msft
    8 years ago

    Hi eburke,

     

    Try this measure out please.

    Measure 2 =
    VAR summaried =
        SUMMARIZE (
            'Table1',
            'Table1'[Advisor],
            'Table2'[Level],
            'Table2'[Value],
            "sumValue", COUNT ( Table1[Customer] ) * 'table2'[value]
        )
    RETURN
        IF (
            HASONEFILTER ( Table1[Advisor] ) && HASONEFILTER ( Table2[Level] ),
            COUNT ( Table1[Customer] ) * MIN ( Table2[Value] ),
            SUMX ( summaried, [sumValue] )
        )

    Another simple way is bringing the value to the table 1 from table 2.

    Valuefromtable2 = RELATED(Table2[Value] )

     

    Best Regards,

    Dale