Forum Discussion

SuperCal99's avatar
SuperCal99
Helper I
3 years ago
Solved

DAX - Location query

Hi,   I have the following sample data set: customerID County Region 10001 Greater London London 10002 Kent South East 10003 Surrey South East 10004 Buckinghamshire South ...
  • some_bih's avatar
    3 years ago

    Hi SuperCal99 based on your sample data, create 3 measures as following, adjust your Table name for sheet1

    Did I answer correctly? Kudos appreciate / accept solution.

     

    #Dist cust = DISTINCTCOUNT(Sheet1[customerID])
    % across all counties =
    DIVIDE([#Dist cust],CALCULATE([#Dist cust],ALL()))
    %  within region =
    DIVIDE([#Dist cust],
        CALCULATE([#Dist cust],
        REMOVEFILTERS(Sheet1),
        VALUES(Sheet1[Region])
        )
    )