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
nabbat
Regular Visitor

Сount the number of crews for each order

Good afternoon!
I tried a lot of methods, but the result was not achieved.
1. Connecting to the database DirectQuery.

2. Connections:

2018-01-21_23-43-25.png

3. In "orders":

2018-01-21_23-46-00.png

4. In "crew_operable_time":

2018-01-21_23-49-23.png

5. In "crews":

2018-01-21_23-51-56.png

6. In "crew_states":

2018-01-21_23-53-09.png

 

I need a graph with the count the number of crews for each order by "crew_states" or the count the number of crews by hour.

Connecting to the database only DirectQuery.
I can not attach a database, too much data.

Can you help to write a report?

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @nabbat,

 

Do you establish relationships for these tables based on [id] field? Why the relationship between 'crews' and 'orders' is one to many but that between 'crews' and 'crew_states' is many to one? Also, I noticed that the values of [id] in crew_operable_time are not matched with [id] in 'crews'. 

 

For that "I need a graph with the count the number of crews for each order by "crew_states" or the count the number of crews by hour", it is too general to imagine such a report. Could you please post an image to show us your desired result? Since your dataset is very large, would you please simplify and post sample data to help me better understand?

 

Regards,

Yuliana Gu

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

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.