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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Nihed
Helper III
Helper III

Need help DAX

Hello,

 

How I can convert this formula into dax please :

IF 'PPM'[Step] = "9-Finalised" then STEP DURATION = SUM(each STEP DURATION from TORs to Signature)

(what is the correct syntax for each)

Thank you.

3 REPLIES 3
VahidDM
Super User
Super User

Hi @Nihed 

 

It'd be better if you share a sample of your data to know the column name and data type.

BTW, you need to use a dax like this:

IF(MAX('PPM'[Step])="9-Finalised",SUM(each STEP DURATION from TORs to Signature))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

Bonjour

Je partage avec vous le lien de mon exemple dans pbix : https://we.tl/t-PjRN81lAWA

 

et mon but est de calculer le KPI dans le tableau ci-dessous (DURÉE DE L’ÉTAPE) à partir des deux tableaux quelqu’un m’a aidé un peu sur ce sujet s’il vous plaît

Nihed_0-1640127090742.png

 

 

Hi @Nihed ,

 

It's hard to understand the calculation logic of "8-xxx"&"9-xxx". In the sample pbix you provided, I can't create the corresponding calculation.

Measure = 
var current_step = MAX(PPM[Steps])
return 
SWITCH(TRUE(),
    current_step = "1 - Planned/Not Started",0,
    current_step="2 - TORs received/under review",AVERAGEX(PPM,PPM[TORs completed]-PPM[TORs received]),
      current_step="3 - Open for Competition",
      AVERAGEX(PPM,PPM[Closes on]-PPM[Posted on]),
      current_step="4 - Technical Evaluations",
      AVERAGEX(PPM,PPM[Technical evaluation completed]-PPM[Closes on]),
      current_step = "5 - Financial Negotiations",
      AVERAGEX(PPM,PPM[Negotiation completed]-PPM[Technical evaluation completed]),
      current_step="6 - Procurement Board",
      AVERAGEX(PPM,PPM[PB date]-PPM[Negotiation completed]),
      current_step = "7 - Legal Review",
      AVERAGEX(PPM,PPM[Reviewed by LEG]-PPM[PB date]),
      current_step="8 - Signature",
      AVERAGEX(
        ))


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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.