Forum Discussion

CharlesK's avatar
CharlesK
Frequent Visitor
8 years ago

DAX function to calculate basket size

So,

 

This is fascinating.

 

I have 2.5m+ transactions and the unique identifier, in my case, is the receipt number; which the table has. I am making the assumption that each individual receipt corresponds to a single customer. as below

 

 

 

I am trying to work out by sales order number (in my case by receipt number as receipt numbers are unique) and subsequently group them into "Baskets with x" items and count those.

 

My end goal is to have an analysis like the one 

 

 

I have absolutely no idea where to start.... In excel i'd have done countif and/or a nested variation of it.

 

But here i dont know where to start.

 

Please help.

3 Replies

  • Hi CharlesK,

     

    Please post  a sample data that we can just copy paste and import into Power BI as well as your countif formula in Excel. 

    • CharlesK's avatar
      CharlesK
      Frequent Visitor

      i've tried attaching something here couldnt manage