Forum Discussion
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?
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.
4 Replies
- IamTDRResponsive Resident
Thanks for the quick reply.
Below is my table visual. As you can see, I have the same order number and two invoice numbers. I would like the field 'Count of invoice_number - copy' to read 2, as I have one order number with two invoices.
Tim
- IamTDRResponsive Resident
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.