Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Different Statistics Based on Various Date Fields

Hi, I have a Date table and Trans table. They are connected Trans[TransDate] ->Date[Date]. I can successfully create various measures to generate stats based on the TransDate, such as total transact...
  • v-frfei-msft's avatar
    8 years ago

    Hi Anonymous,

     

    I made one sample for your reference. You can refer to the following steps.

     

    1. Create the relationship between tables like this.

     

    2. Create the measures as below.

     

     

    Createcount = CALCULATE(COUNTROWS(Trans),USERELATIONSHIP('Date'[Date],Trans[ProdOrderCreateDate]))
    finishcount = CALCULATE(COUNTROWS(Trans),USERELATIONSHIP('Date'[Date],Trans[ProdOrderFinishDate]))
    Transcount = CALCULATE(COUNTROWS(Trans))

     

     

     

     

    For more details, please check the pbix as attached.

     

    https://www.dropbox.com/s/sjmcwwceldlwv6v/Different%20Statistics%20Based%20on%20Various%20Date%20Fields.pbix?dl=0

     

     

    Regards,

    Frank