Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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])
 

1 Reply

  • dax's avatar
    dax
    Icon for Community Support rankCommunity 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 Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.