Forum Discussion

tmv3v's avatar
tmv3v
Frequent Visitor
6 years ago
Solved

Frequency distribution from raw data

Currently say I have some sales data:   CustomerID ProductID CustomerCountry PricePaid 12345678 P1234567 US 300 12345678 P1234568 US 300 12345678 P1234569 US 300 12345670 P1234567 US 300 12345...
  • rajulshah's avatar
    6 years ago

    Hello tmv3v,

     

    Please create a calculated column as follows:

    Number of Purchases = CALCULATE(COUNT(Purchases[ProductID]),FILTER(ALL(Purchases),Purchases[CustomerID]=EARLIER(Purchases[CustomerID])))

     

    Then, plot 'Number of Purchases' and CustomerId in a table visual.

    Make sure to select 'Don't summarize' for 'Number of Purchases' and 'Count' for 'CustomerID'. See below:

     

    Hope this helps.