Forum Discussion
Dax Measure for Counting Order Numbers with Multiple Invoice Numbers
- 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.
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
- parry2k7 years agoSuper User
IamTDR create a measure
on table visual, drop order number column and following measure, and you will get count.
# of Invoices = COUNT( Table[Invoice Number] )
- IamTDR7 years agoResponsive 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.