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
smithshire
Frequent Visitor

Create New Table with Count

I have a table with the following information:-

 

BDMDepot
Internal01Liverpool
Internal01Liverpool
Internal01Manchester
Internal01Manchester
Internal02Manchester
Internal03Liverpool
Internal03Manchester
Internal03Manchester
Internal03Bolton
Internal03Bolton

 

I wish to create a new table that counts the number of times each BDM is listed against each depot and adds in the current date each day the table is updated:-

 

DateDepotBDMTotal
21/04/2022LiverpoolInternal012
21/04/2022ManchesterInternal012
21/04/2022ManchesterInternal021
21/04/2022LiverpoolInternal031
21/04/2022ManchesterInternal032
21/04/2022BoltonInternal032

 

What is the best way to approach this?

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

To get the date when the data was last refreshed you would need to create a new query in Power Query which returns the current date. You can then use that to create a new summary table like

Summary Table = CROSSJOIN(
	SUMMARIZECOLUMNS( 'Table'[Depot], 'Table'[BDM], "Total", COUNTROWS('Table') ),
	LastUpdated
)

where LastUpdated is the table with the last updated date in it

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

To get the date when the data was last refreshed you would need to create a new query in Power Query which returns the current date. You can then use that to create a new summary table like

Summary Table = CROSSJOIN(
	SUMMARIZECOLUMNS( 'Table'[Depot], 'Table'[BDM], "Total", COUNTROWS('Table') ),
	LastUpdated
)

where LastUpdated is the table with the last updated date in it

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.