Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello, we have a django web application that is utilizing content types and generic foreign keys, and if you're unfamiliar with that, essentially. Its a referential lookup on other tables.
So in this example, I have merged together a few tables to represent this table structure, only showing relevant columns for complexities sake.
lookuptable (first row is formulas)
| formulas being applied | merged in from django_contenttype using utilized_model_id | merged in from django_contenttype using utilized_model_id | concat("public ", app_label, "_", model) | ||
| id | utilized_model_object_id | utilized_model_id | app_label | model | lookuptable |
| 1 | 4 | 112 | aqe | idarea | public aqe_idarea |
| 2 | 5 | 112 | aqe | idarea | public aqe_idarea |
| 3 | 6 | 112 | aqe | idarea | public aqe_idarea |
| 4 | 7 | 112 | aqe | idarea | public aqe_idarea |
| 5 | 8 | 112 | aqe | idarea | public aqe_idarea |
| 3691 | 1 | 354 | corelookup | lookupcheckoutsection | public corelookup_lookupcheckoutsection |
django_contenttype
| id | app_label | model |
| 1 | biq | area |
| 2 | biq | building |
| 112 | aqe | idarea |
| 354 | corelookup | lookupcheckoutsection |
aqe_idarea
| id | areaname | area rollup |
| 4 | TM north | transmissions |
| 5 | TM South | transmissions |
| 6 | TM north2 | transmissions |
| 7 | tm south2 | transmissions |
| 8 | TM south5 | transmissions |
What I want to do is merge into the lookuptable the dynamic lookup from the related django_contenttypes with a subquery.
The resulting table would look like lookuptable, but it would have aqe_idarea.areaname and aqe_idarea.area rollup on rows 1 - 5, but then it would do the lookup for corelookup_lookupcheckoutsection.[column N's name] on row 3691.
How do I do this in the advanced query editor to essentially sub query for each row?
I'm unsure that I'm understanding correctly. Can you explicitly show what the final result should look like for the given example?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |