Forum Discussion
ESTABLISH A RELATIONSHIP WITHOUT A RELATIONSHIP
I have a dashboard that uses direct query. I do not have permissions to establish relationships between the tables in the data set.
If I had the appropriate permissions I would establish a relationship between the factsalesorderline table and the factsalesinvoiceline table. As a work around I created the calculated column below
Invoice Date = LOOKUPVALUE(FactSalesInvoiceLine[MAX_Date Column],FactSalesInvoiceLine[SalesOrderNumber],FactSalesOrderLine[SalesOrderNumber])
I tried to create a new measure as shown below that references the invoice date ([INV_Order Weighted Avg) I also added another column from the factsalesorderline table (Book and ship V3) When i place the measure in a bar chart I get a message telling me I need to establish a relationship. Does anyone know of a way for me to successfully add the measure below to my bar chart
Book and ship v3 = SWITCH(TRUE(),
[Negative Date diff measure] < 0,"Extended",
[INV_Order Weighted Avg]<7, "Book & Ship",
[INV_Order Weighted Avg]>0,"Extended"
)
- Anonymous2 years ago
Hi Anonymous ,
For normal sql db, in direct query mode, the creation of relationships between tables in powerbi desktop is supported. Then dax formulas are created based on these tables.
However, it is important to note: You cannot edit, delete, or create new relationships in the same Power BI Semantic Model or Analysis Services source. If you have edit permissions for these sources, you can make changes directly in the data source.
Then delete the appropriate credentials in desktop, reproduce the connection to this data source, and publish to services as needed.Import mode about semantic model and Direct query mode about semantic model:
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi Anonymous ,
For normal sql db, in direct query mode, the creation of relationships between tables in powerbi desktop is supported. Then dax formulas are created based on these tables.
However, it is important to note: You cannot edit, delete, or create new relationships in the same Power BI Semantic Model or Analysis Services source. If you have edit permissions for these sources, you can make changes directly in the data source.
Then delete the appropriate credentials in desktop, reproduce the connection to this data source, and publish to services as needed.Import mode about semantic model and Direct query mode about semantic model:
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.