Forum Discussion
Anonymous
7 years agoNot applicable
Distinct count from 2 columns in 2 tables
Hello,
I am trying to do a distinct count on two different fact tables ('Transaction Log'[Start Transaction Date] and 'Tote Info'[Ship Date]). Current, I have a measure called # of Ship Dates (see below) which is taking the max of the distinct count of each field separately. I'd like for those fields to be combined and then take the distinct count.
# of Ship Dates = MAX(DISTINCTCOUNT('Tote Info'[Ship Date]),DISTINCTCOUNT('Transaction Log'[Start Transaction Date]))
I ultimately use this measure in my Total Usable Truck Cube measure (see below).
Total Usable Truck Cube = SUMX('Truck Specs', 'Truck Specs'[Usable Truck Cube (ft)]*[# of Ship Dates])
I've attached a sample file link. https://1drv.ms/u/s!AiFttrDOn_FqgRwvnxNdcJxl0S-Z?e=y8AsQz
1 Reply
- dax
Community Support
Hi JDaly,
If possible, could you please inform me more detailed information(such as your expecting output and your sample data)? It seems that your pbix file use direct query, I can't access data in report.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.