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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

if "Table" available then upload, if not then "This is a premium table, please contact admin!"

Hi,

I wonder if it is possible to conditionally upload a table if it is available in the database, and if not i will create a table with one line message that "this table is not available in this database, contact the admin"?

 

My scenario is that I am an ISV and developed a solution on Dataverse (CDS), which has two versions: basic and premium tables and features, so when a customer gets the basic, the premium tables will not be available in their environment.

Now I need to develop a Power BI template App that can connect to either the basic install or the premium install, which means this template app should connect to all tables, but when the customer has only a basic install of the database, and try to use the Power BI app, there will be an error regarding the premium tables because it is simply looking for them and they are not there!!

 

I definitely could create two separate reports and two separate template apps, but i do not want to maintain two reports which have more that 75% common data.

 

all of this would have been solved if Template apps support more that one dataset, but unfortunately it doesn't, that's why I am trying to make it all in one dataset.

 

so can I acheive this somehow?

 

really appreciate the help.

 

thanks,

Mohammad

 

1 ACCEPTED SOLUTION
artemus
Microsoft Employee
Microsoft Employee

What you can do is edit the line where you navigate to the table and put in something like:

 

= MyDatabase{[Schema="dbo",Item="MyTable"]}?[Data]? ?? #table(type table [MyColumnName = text], {{"Please Contact Admin"}})

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Wow... that actually worked like a charm! the only little more work that need to be done is that the output schema of this line should be exactly the same as the original table, which means I should manually add all columns that are available in the original table, right?

 

Thanks,

Mohammad 

As an alternative to #table(...), you can also use:  (error "Please Contact Admin"). If the user tries to load the model with that logic, they will see an error message instead.

Yes, if you have any visuals in the template you need to do this for consistency. You can use null for the other columns

artemus
Microsoft Employee
Microsoft Employee

What you can do is edit the line where you navigate to the table and put in something like:

 

= MyDatabase{[Schema="dbo",Item="MyTable"]}?[Data]? ?? #table(type table [MyColumnName = text], {{"Please Contact Admin"}})

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors