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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Milozebre
Helper V
Helper V

Problem with a measure

Hello,

I have a question about a measure. I have this picture 'picture1).

I get "Engagement Ok and KO" in a SQL query that says if the escalation level is greater than 3 then this is Ok

I would like to be able to make the percentage of commitments in relation to the total

Example for ISIE Service: Ok 92.79% and KO 7.21%

When I do this: MEASURE SLA = CALCULATE (COUNT ('Folders Clos' [RespectCommitment]);         FILTER (ALLSELECTED ('Closed Folders'); 'Folders Closed' [RespectCommon] = "ENGAGEMENT OK") ) / COUNT ('Closed Folders' [RespectCommission])

I get this (picture2)

Can you help me ?

picture1.jpgpicture2.jpg

 

Thank you

1 ACCEPTED SOLUTION
Interkoubess
Solution Sage
Solution Sage

Hi @Milozebre,

 

I recreated your sample data and I don<t hve the same percentge for example for ISIE-Retail (65/1033=6,30% and 968/1033=93.7%).

Anyway I created this measure below and it seems to work for me ( check the printscreen as well):

Pourcen =
VAR Nbr =
    CALCULATE ( SUM ( Data[Nombre] ), ALL ( Data[Engagement] ) )
RETURN
    DIVIDE ( SUM ( Data[Nombre] ), Nbr, BLANK () )

If it does not work or if you have any observations please let us know.

 

TotalKO.png

Ninter

View solution in original post

2 REPLIES 2
Milozebre
Helper V
Helper V

Hello InterKoubess, 

 

First, thank you for your response and its working.

I modify (in my case) because withe the SQL request you didn't have, the COUNT function is more suitable. 

the measure like this : 

Pourcentage =
VAR Nbr =
CALCULATE ( COUNT ( 'Dossiers Clos'[RespectEngagement] ); ALL ('Dossiers Clos'[RespectEngagement]) )
RETURN
DIVIDE ( COUNT ( 'Dossiers Clos'[RespectEngagement] ); Nbr; BLANK () )

 

A big thank you for your help.

Interkoubess
Solution Sage
Solution Sage

Hi @Milozebre,

 

I recreated your sample data and I don<t hve the same percentge for example for ISIE-Retail (65/1033=6,30% and 968/1033=93.7%).

Anyway I created this measure below and it seems to work for me ( check the printscreen as well):

Pourcen =
VAR Nbr =
    CALCULATE ( SUM ( Data[Nombre] ), ALL ( Data[Engagement] ) )
RETURN
    DIVIDE ( SUM ( Data[Nombre] ), Nbr, BLANK () )

If it does not work or if you have any observations please let us know.

 

TotalKO.png

Ninter

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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