Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Daily Transactions Bypassing Dates

The goal is to calculate sales across all dates regardless if the sales occurred on that date or not. Currently, I am calculating sales that occurred on the date of the transaction (ex: "current_sale...
  • v-luwang-msft's avatar
    5 years ago

    Hi Anonymous ,

    IF you want to create a new coulumn to calculate output,use the following:

    out1 = SUM('Table'[current_sales_output])/COUNTROWS('Table')

    And if you want to create a measure to calculate it ,use the following :

    out2 = CALCULATE(SUM('Table'[current_sales_output])/COUNTROWS('Table'),ALL('Table'))

    Final output:

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien