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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
costic
Frequent Visitor

Display number of workdays

Hi,

I come to you because i'm trying to find a way to solve the problem as following :

 

here is the context : i ve got 4 tables.

 

Relationships :

Collab[Tri]                 1____*  Prevision[Name]

Cal[Date]                   1----*  Prevision[Date]

Cal[Date]                   1____*  Collab[Date]

Collab[Tri]                 1____*  Command[Name]

Cal[Date]                   1____*  Command[Start Date]

 

As you can see, there's no direct relation between Command table and Prevision table.

 

Datas

Collab = ["Tri","Date","Agency","Company","Seller"]

Cal... Well, it's a calendar table

Prevision = ["Name","Date (month)","WorkDays nb"]

Command = ["Start Date", "End Date", "Ref","RefPost","Name", "ClientName","PriceDay","Quantity"]

 

*Ref is a global command (like "Cars")

 RefPost is an unitary command (like "Tesla P85D") under a global command.

 

Request

For each Agency (Collab table), client (Command table), seller (Collab table), Collab(names in Collab table), Ref (Command table), RefPost (Command table), start date and end date (Command table), i would like to have : quantity (number of days bought in Command table), PriceDay (Command table), and workdays nb (Prevision table) for each year/quarter/month

 

here s an sample :

 

         2021  
         Q3  
CompanyAgencyClientSellerCollabRefRefPostStartEndQuantityPriceDayWordays nb
Company1Agency1Client1Seller1Collab1Ref1RefPost1.107/01/2109/30/216050050
   Seller2Collab2Ref2RefPost2.107/01/2109/30/216050055
    Collab3Ref2RefPost2.208/01/2109/30/214564045
 Agency2Client1Seller3Collab4Ref2RefPost2.309/01/2112/31/211953018

 

etc...

I tried with some DAX measures, but can't make it... must be tired!!! 

 

Thank you for helping me

0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors