Forum Discussion
Count tables in Power bi model
Hi All,
How will we count automatically number of tables in power bi model?
Thanks,
Hey Arul ,
if you just want your own tables without system tables, then execute the following query in DAX studio:
select * from $SYSTEM.TMSCHEMA_TABLESIn the Output window you will see the count of tables you have:
Be aware that this contains also hidden tables, but this you can easily see in the result:
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
5 Replies
- selimovd
Most Valuable Professional
Hey Arul ,
I don't think there is a way to count them directly in Power BI.
DAX always needs a specific table reference and there is no such thing as a meta table in Power BI. In DAX Studio that would be possible ( select * from $SYSTEM.DBSCHEMA_TABLES), but as far as I know not in Power BI directly.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic- Arul
Super User
Hi jdbuchanan71 selimovd ,
I just need count of tables of my power bi model. The above query result is giving me the list of all the tables. I hope you understand my issue here.
Thanks,
-Arul
- selimovd
Most Valuable Professional
Hey Arul ,
if you just want your own tables without system tables, then execute the following query in DAX studio:
select * from $SYSTEM.TMSCHEMA_TABLESIn the Output window you will see the count of tables you have:
Be aware that this contains also hidden tables, but this you can easily see in the result:
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
- jdbuchanan71
Super User
You can get the list of all tables using the VertiPaq Analyzer. https://www.sqlbi.com/tools/vertipaq-analyzer/
Dax Studio can also give you the list. https://daxstudio.org/