March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
How do I calculate the avg sale of a weekday? For example, I have sales data from Aug1- today and I want to be able to calculate all the sales of all the Mondays and then get the avg sales of a Monday. Same for each of the other days of the week. i tried to just enter the weekday on the table and then sales number on the values field and then change it from sum to avg but it gave me a weird number. I also tried to use this DAX but it didnt work either :AVERAGEX(SUMMARIZE('Calendar','Calendar'[Date],'Calendar'[Weekday],"sum",AVERAGE('Data)'[Total Amt)])),[sum])
Solved! Go to Solution.
Hi @mlmagl14 ,
Add a weekday column to sales table.
Also add a weekday column to calendar table and use it as slicer.
Then create a measure like below:
measure = calculate(average(table[sales]),filter(all(table),table[weekday] = selectedvalue(slicer[weekday])))
If I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay
Hi @mlmagl14 ,
Add a weekday column to sales table.
Also add a weekday column to calendar table and use it as slicer.
Then create a measure like below:
measure = calculate(average(table[sales]),filter(all(table),table[weekday] = selectedvalue(slicer[weekday])))
If I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay
Hi,
To your visual, drag Weekday and write this measure
Average sales = average(Data[sales[)
Hope this helps.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |