Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
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"}})
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
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"}})
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
54 | |
21 | |
12 | |
11 |