I am somewhat new to PowerBi and been doing some investigating. For this example, please refer to the table. The table is called Table1.
[Table1]
month_desc month-day Order Status
Jul 7-Jul Canceled
Jul 8-Jul Complete
Jul 2-Jul Complete
Jul 14-Jul Complete
Jul 21-Jul Complete
Jul 7-Jul Canceled
Jul 8-Jul Complete
Jul 14-Jul Complete
Jul 14-Jul Complete
Jul 22-Jul Canceled
Jul 8-Jul Complete
Jul 16-Jul Complete
Jul 9-Jul Canceled
Aug 11-Aug Complete
Aug 18-Aug Complete
Jul 14-Jul Canceled
The data above is partial data to give an idea of the data. Also, the data will not included Saturdays and Sundays The equation to get the average daily canceled is the number of canceled by month / the number of days in the month.
I can get the number of canceled orders in DAX
Count of Canceled Order = CALCULATE(COUNTROWS('Table1'),filter('Table1','Table1'[Order Status]="CANCELED"))
How do I get the number of days per month in Table1 and use it to divide 'Count of Canceled Order' to get a new measure for the average daily canceled orders? This measure would have to be dynamic.
Or can I get this to work by using AVERAGEX function?