Forum Discussion

IamTDR's avatar
IamTDR
Responsive Resident
7 years ago
Solved

Dax Measure for Counting Order Numbers with Multiple Invoice Numbers

Is there a way to calculate within a table the number of invoices associated with a order number?
  • IamTDR's avatar
    IamTDR
    7 years ago

    I needed to keep the Order Number column in my visual.

     

    I just completed getting my visual to work as designed by using power query.

    I made a duplicate of my table, left just the order_number and invoice_number columns. Did a grouping on order_number distinct count on invoice_number.  Merged these results to my oringial table.  Then finally added the newly created field into my visual and deselected 'sum'.

     

    Thanks for the aid.  I'm sure a better way could be done.