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
PBI5851
Helper V
Helper V

Creating a derived table in Power BI

I have a table which when used with extensive DAX, i keep getting the "Cannot display visual "as not enough reources available. When checking the analyzer, there is a DAX that is taking up majority of the time. i have sufficient filters to limit the data, but not sure what else is going on. It is referencing a table that has around 2 million rows. I'm assuming that since it has to read that entire table and use the filters, it may be using up the resources. 

 

My question is can i create a derived table in Power Bi similar to a count(*)/group by in SQL . 

 

Existing table in power BI

AccountIDAccountDateAccountStatusClientType
A12341/1/2020CancelledEastShoes
A2341/1/2020ShippedEastBelt
A3451/1/2020ShippedEastBelt
A4561/5/20CompleteWestShoes
A2341/5/20CompleteWestMask
A3451/8/20CompleteSouthBuckle

 

Is it possible to create a dynamic table as below within Power BI and use that in the relationship and subsequent visuals , (in sql, select count(*) CountNum, AccountDate, Client, Accountstatus from AccountSales group by Accountdate, Client, AccountStatus)

 

CountNumAccountDateClientAccountStatus
11/1/2020EastCancelled
21/1/2020EastShipped
21/5/2020WestComplete
11/8/2020SouthComplete

 

Any recommendations. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PBI5851 , new table

summarize(Table,Table[AccountDate],Table[Client], Table[AccountStatus], "Count",countrows(Table)))

 

Also, refer how can work with a table and aggregated Table

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-aggregations

https://radacad.com/power-bi-aggregation-step-1-create-the-aggregated-table

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @PBI5851 

If you connect to sql server with import mode, please enter sql statement as below:

Capture2.JPG

Select SubjectId, ExamDate, count(StudentNo) as CountNum From dbo.Result$ Group By SubjectId, ExamDate

Then can limit the rows imported into power bi.

 

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@PBI5851 , new table

summarize(Table,Table[AccountDate],Table[Client], Table[AccountStatus], "Count",countrows(Table)))

 

Also, refer how can work with a table and aggregated Table

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-aggregations

https://radacad.com/power-bi-aggregation-step-1-create-the-aggregated-table

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.