cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nabbat Visitor
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
Microsoft v-yulgu-msft
Microsoft

Re: Сount the number of crews for each order

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
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)