cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

## filter Table of holidays

Hello, I have a measurement to calculate the delivery days, taking into account working days and holidays:

"DiasCierre = NETWORKDAYS ( PLZENT [F.PED] , PLZENT [F.Cie.PED] , 1 , VALUES ( FestPto [FechaFest] )"
Orders are from different PTOVTA outlets.
And the festive table contains the PTOVTA and FechaFest columns.
How do I get PTOVTA Fest to filter dates?
It currently takes into account the public holidays of all PTOVTA
1 ACCEPTED SOLUTION
Community Support

You can try something like below. It is a column formula here.

``````Delivery Days =
VAR pto = PLZENT[PtoGestion]
RETURN
NETWORKDAYS(PLZENT[Start date], PLZENT[End date], 1, CALCULATETABLE(VALUES(FestPto[FechaFest]),FestPto[PtoGestion]=pto))``````

Additionally, if there is a relationship between two tables on PtoGestion column and the cross-filter direction is Single (PLZENT filters FestPto), you can also try this for a column

``````Delivery Days 2 =
NETWORKDAYS(PLZENT[Start date], PLZENT[End date], 1, SELECTCOLUMNS(RELATEDTABLE(FestPto),"holidays",'FestPto'[FechaFest]))``````

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

2 REPLIES 2
Community Support

You can try something like below. It is a column formula here.

``````Delivery Days =
VAR pto = PLZENT[PtoGestion]
RETURN
NETWORKDAYS(PLZENT[Start date], PLZENT[End date], 1, CALCULATETABLE(VALUES(FestPto[FechaFest]),FestPto[PtoGestion]=pto))``````

Additionally, if there is a relationship between two tables on PtoGestion column and the cross-filter direction is Single (PLZENT filters FestPto), you can also try this for a column

``````Delivery Days 2 =
NETWORKDAYS(PLZENT[Start date], PLZENT[End date], 1, SELECTCOLUMNS(RELATEDTABLE(FestPto),"holidays",'FestPto'[FechaFest]))``````

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

I tried this but it gives an error:

CALCULATE(NETWORKDAYS(PLZENT[F.PED],PLZENT[F.Cie.PED],1,values(Holidays[FechaFest])),Holidays[PtoGestion]=PLZENT[PtoGestion] )

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.