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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Upali63
Helper II
Helper II

Extract Weekly Sales volume from Daily transaction table

Hi Friends

I am new to power BI

I have two table as shown below. One for the weekly data and otherone for daily transactions. What I want is to make report in my power bi dash board to show weekly information with last column in my report to be based on data from the daily transation table. In that I want price multified by qty to be shown as Turnover in my weekly report. Kindly help me to solve my issue. Thank you

 

Upali63_0-1674473087350.png

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Upali63 ,

 

--1--

In Power Query, select your Daily Table query and go to the Add Column tab > Custom Column. Call it 'Turnover' and use the following calculation:

[Price] * [Qty]

 

--2--

Then create a calendar table in Power Query (many examples online) with a [WeekEndingDate] column. In PQ, you would create it like this:

Date.EndOfWeek([Date], Day.Friday)

Adjusting the 'Day.Friday' argument to the desired first day of the week.

 

--3--

Apply all to the data model and relate:

Calendar[Date] to WeeklyTable[W-End]

Calendar[Date] to DailyTable[Date]

 

--4--

Create a measure for your Turnover value:

_turnover = SUM(DailyTable[Turnover])

 

--5--

In a table visual, add these fields:

Calendar[WeekEndingDate]

WeeklyTable[All columns except [W-End] ]

...and add this measure:

[_turnover]

 

This should do what you want.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @Upali63 ,

 

--1--

In Power Query, select your Daily Table query and go to the Add Column tab > Custom Column. Call it 'Turnover' and use the following calculation:

[Price] * [Qty]

 

--2--

Then create a calendar table in Power Query (many examples online) with a [WeekEndingDate] column. In PQ, you would create it like this:

Date.EndOfWeek([Date], Day.Friday)

Adjusting the 'Day.Friday' argument to the desired first day of the week.

 

--3--

Apply all to the data model and relate:

Calendar[Date] to WeeklyTable[W-End]

Calendar[Date] to DailyTable[Date]

 

--4--

Create a measure for your Turnover value:

_turnover = SUM(DailyTable[Turnover])

 

--5--

In a table visual, add these fields:

Calendar[WeekEndingDate]

WeeklyTable[All columns except [W-End] ]

...and add this measure:

[_turnover]

 

This should do what you want.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thanks

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.