Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Create a Distinct Count of orders within a Datesbetween parameter

Hi,   Im trying to get a distinct count of orders between two dates of orders,   At the moment i have this but it returns a Null; Dist Orders in 2014 = CALCULATE(DISTINCTCOUNT('TableName'[OrderI...
  • parry2k's avatar
    9 years ago

    Seems like you have DATE table that has relation with orders table:

     

    Try this:

     

    Dist Orders in 2014 = CALCULATE(DISTINCTCOUNT('TableName'[OrderID]), 
    DATESBETWEEN('TableName'[Date], 
        DATE(2013,10,1),  
        DATE(2014,09,3)  
      ))