Forum Discussion

Vindesh's avatar
Vindesh
Regular Visitor
4 years ago

Need Help

Hi,

I have 3 tables (PrimarySales,SecondarySales and Hierarchy).

Territory Column is common among them and i have joined Hierarchy table with PrimarySales and Secondary sales table on common Key(Territory).

Now, I want to have a mesure which can give me count of Territory whose Secondary sales is <90% of Primary Sales or vice versa.

Please guide and help to achieve the same.

10 Replies

  • Vindesh ,  Try measure like

     

    Sumx(Filter(values(Hierarchy[Territory]), [Secondary Sales measure] >90 ) , [Secondary Sales measure])

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Can you show a depiction of how the model is set up please?

      • PaulDBrown's avatar
        PaulDBrown
        Community Champion

        Ok, you need a couple of measures (+ the sum for the sales in each table)

        Sales 1 where S2 > 90% =
        VAR _90Threshold =
            DIVIDE ( [Sum Sales 1], [Sum Sales 2] )
        RETURN
            IF ( _90Threshold > 0.9, 1 )
        
        Final = 
        SUMX(VALUES('Hierarchy'[Region]), [Sales 1 where S2 > 90%])