Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lf2606
Frequent Visitor

Agreggate values by date by category and obtain date-based averages

Assume I have a dataset that contains transactions in which there are these columns

 

lf2606_0-1679681967661.png

 

I wish to obtain data that would look like this: 

lf2606_2-1679682004482.png

So ideally for any given time range I could have something like this at the end: 

 

Week X/1/23 - X/7/23

lf2606_3-1679682088552.png

 

I'm sorry for making such a complex question but I'm fairly new to PowerBI/DAX and I'm not sure how to obtain those values and then graph them through power bi.   

 

I know how to do this in excel but it is very time-consuming to export it from source to excel, then obtain tables, then import it in PowerBI to graph it. Any ideas as of how to make all the calculations to use for visuals in PowerBI would be appreciated.

 

Thanks!

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lf2606 ,

 

Please check if this is the output you expect.

Sum of Daliy Qty = SUM('Table'[Quantity])
Avg by client = CALCULATE(AVERAGE('Table'[Price]),ALLEXCEPT('Table','Table'[Client]))
Avg by date = CALCULATE(AVERAGE('Table'[Price]),ALLEXCEPT('Table','Table'[Date]))
Avg by date and client = AVERAGE('Table'[Price])

vcgaomsft_0-1679896563922.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @lf2606 ,

 

Please check if this is the output you expect.

Sum of Daliy Qty = SUM('Table'[Quantity])
Avg by client = CALCULATE(AVERAGE('Table'[Price]),ALLEXCEPT('Table','Table'[Client]))
Avg by date = CALCULATE(AVERAGE('Table'[Price]),ALLEXCEPT('Table','Table'[Date]))
Avg by date and client = AVERAGE('Table'[Price])

vcgaomsft_0-1679896563922.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.