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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Amatos
Regular Visitor

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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