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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Creation of a specific DAX measure

Hi everyone,

 

I got a table with :

the name of the provider (= column Fournisseur)

the month of delivery (= column Mois Livraison L)

a column for know if the delevery was OK or NOK (= column Conformité). If the delivery is OK it will be write CONFORME and if the delivery is NOK it will be write NON CONFORME

 

Amatos_2-1688993898602.png

 

I wanted to create a curve graph with theses informations :

Legend --> name of the provider

X axis --> the month of delivery (= column Mois Livraison L)

Y axis --> the % of compliant deliveries

Amatos_4-1688994562931.png

 

My problem is for the Y axis. I have to create a measure but i don't know how do it.

For exemple, if my provider "X" have done ten deliverys in January, 8 "CONFORME" and 2 "NON CONFORME", i wanted that the Y axis show the % of compliant deliveries fort the couple provider/month, so 80% for this exemple.

 

Thansk in advance for your help.

 

Best regards, Romain

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

% compliant =
VAR Compliant =
    CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Conformite] = "CONFORME" )
VAR Total =
    COUNTROWS ( 'Table' )
VAR Result =
    DIVIDE ( Compliant, Total )
RETURN
    Result

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Try

% compliant =
VAR Compliant =
    CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Conformite] = "CONFORME" )
VAR Total =
    COUNTROWS ( 'Table' )
VAR Result =
    DIVIDE ( Compliant, Total )
RETURN
    Result

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.