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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
CAMARA
Frequent Visitor

Calcule le retard d'un projet

Bonjour 

j'ai une table projet qui contient les colonnes name(nom de projet), start(date de debut), finish(date de fin), pourcentage(pourcentage d'avancement de projet).

J'ai besoin de votre aide svp. Le but est d'écrire une ou plusieurs formules DAX permettant de calculer le retard des projets. Par exemple:

le premier(1) projet est en retard car la date de finition(Finish) c'etait en 2023 et le pourcentage est 5%.

le premier(2) projet est en retard car la date de finition(Finish) c'etait en 2023 et le pourcentage est 90%.

Mais les 10,11 eme projets ne  sont pas en retard car leur dates de finition(Finish) c'est en 2024 et leur pourcentages respectifs sont de 0%.

 

Merci pour votre temps.

Ci-joint un exemple de données:

 

Ca.PNG

 

 

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi @CAMARA ,

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1716256159835.png

2.Create the new column to filter the project.

Status = 
VAR DateFinish = TODAY()
RETURN
    IF(
        AND(YEAR('Table'[Finish]) < YEAR(DateFinish), 'Table'[Percentage] < 1),
        "Delayed",
        "Non delayed"
    )

3.Create the new measure to filter the project delayed.

Delayed project = 
VAR statu_ = SELECTEDVALUE('Table'[Status])
RETURN
IF(statu_ = "Delayed", "red", "green")

4.Select Name column and choose conditional formatting.

vjiewumsft_1-1716256177384.png

5.Select Field value style and base on the measure.

vjiewumsft_2-1716256249603.png

6.The result is shown below.

vjiewumsft_3-1716256257552.png

Best Regards,

Wisdom Wu

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

1 REPLY 1
v-jiewu-msft
Community Support
Community Support

Hi @CAMARA ,

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1716256159835.png

2.Create the new column to filter the project.

Status = 
VAR DateFinish = TODAY()
RETURN
    IF(
        AND(YEAR('Table'[Finish]) < YEAR(DateFinish), 'Table'[Percentage] < 1),
        "Delayed",
        "Non delayed"
    )

3.Create the new measure to filter the project delayed.

Delayed project = 
VAR statu_ = SELECTEDVALUE('Table'[Status])
RETURN
IF(statu_ = "Delayed", "red", "green")

4.Select Name column and choose conditional formatting.

vjiewumsft_1-1716256177384.png

5.Select Field value style and base on the measure.

vjiewumsft_2-1716256249603.png

6.The result is shown below.

vjiewumsft_3-1716256257552.png

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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