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

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.

Reply
Anonymous
Not applicable

Sharepoint and SQL Many to One Relation Problem in Composite Feature (Preview)

Hi everybody, I have a problem trying to build a report that shows SLAs for our Ticketsystem.

 

I have the following SQL tables: / sharepoint online lists

I use the composite preview feature, the SQL querys are direct query and the sharepoint is imported mode.

 

Sharepoint:

Customer

- ID (unique)

- Title (unique)

 

SLA

- CustomerID

- Value (i.e. 10)

- Unit (i.e. minutes)

- SLATypesID

 

SLATypes

- ID

- Type (i.e. reactiontime priority 1)

 

And in SQL I have a list of tickets

Tickets

- ID

- CustomerName (Is equal to the title of the customer sharepoint list)

- Reaction Time

 

The Relations that PowerBI detects is:

 

Tickets *-* Customer 1-* SLA *-1 SLATypes

 

With this data I wanted to have a SLA Report, so for each ticket calculate the SLA that should take account depending on the priority and the customer name of each ticket.

 

Here are my problems with that:

 

1. In the Customer sharepoint list I had set the Customer Title attribute to be unique, so the relation should be 1-* and not *-*?

   Both of these Columns are Text. I even copied the list to excel and did the "demove duplicates" trick but it shows no duplicates..

   Can someone explane why there could be a relationship 1-* be made?

2. I can relate Tickets to Customers and I can relate Customs to SLAs but I cant relate Tickets to SLA.

3. I thought of another workaround which does not use relations but for each ticket calculate the needed SLA based on CALCULATE or LOOKUPVALUE function but these seem not to work because of the direct query mode. Do you know any alternatives?

 

Thank you for your help!

 

best regards

Duffkess

 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Anonymous,

This behavior is by design in mixed storage mode. I got the following response from PG:

"By design, cross island relationship is always Many to many for now. For GA of composite model, we will allow a many to one cross island, but even that would still have some restrictions and wont support everything a same source many to one does."

There is a simiar thread for your reference.

https://community.powerbi.com/t5/Issues/Composite-Models-Date-Table-incorrectly-creates-many-to-many/idi-p/488312

Regards,
Lydia


Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

@Anonymous,

This behavior is by design in mixed storage mode. I got the following response from PG:

"By design, cross island relationship is always Many to many for now. For GA of composite model, we will allow a many to one cross island, but even that would still have some restrictions and wont support everything a same source many to one does."

There is a simiar thread for your reference.

https://community.powerbi.com/t5/Issues/Composite-Models-Date-Table-incorrectly-creates-many-to-many/idi-p/488312

Regards,
Lydia


Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Can you edit the relationship to be 1-*? 

 

There is a possibility where capitalization is causing SharePoint to think that a value is unique but not Power BI. Tough to say, that's a long shot. Any chance you can share data? 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I cant edit the relationship, it just says: "The cardinality you selected isn't valid for this relationship".

 

I read about the problem with case sensivity, but currently im testing with 7 different customers where every value in the SP list is unique. I even used the "Remove Duplicates" in the PowerBI Query to archive unique values, but still I got same problem.

 

Can you turn off Composite Models in your Preview Features? That will prevent a *-* from being created. Then see what happens. Wonder if there might be some kind of bug. 

 

You could always try to create an Enter Data query and enter your customers manually and try it, this might help track down if it is some weird issue with your query or something.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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