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
jrsaraiva
New Member

Help to Calculate % Based Text Collumns

Hy Guys. 

 

I Need a litle help to create a measue to calculate % conclusion based in collun with text. 

My delivery is fixed at 4 collumns and received the text Yes or No.

 

Is my Base:

prjetos.jpg

 

1 ACCEPTED SOLUTION

Hi @jrsaraiva 

IF ( table[Delivery1] = "Yes", 1, 0 )
VAR _D1 =
    IF (MAXtabela [Entrega1]) = "Sim", 1, 0) table = substitute your table name Delivery1 substitute each column name "Yes" substitute "Sim"

Also let us add MAX() to each line ----Também vamos adicionar MAX () a cada linha

VAR _D1 =
    IF ( MAX(table[Delivery1]) = "Yes", 1, 0 )

 

Se você ainda receber mensagens de erro, veja se pode copiar e colar no tradutor do Google




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

7 REPLIES 7
Nathaniel_C
Super User
Super User

Hi @jrsaraiva ,

If I understood this, you are looking for an overall percentage of yes's.

Overall pcet.PNG

PBIX Here PBIX 
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Nathaniel_C
Super User
Super User

Hi @jrsaraiva ,

Try this.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

Measure % =
VAR _D1 =
    IF ( table[Delivery1] = "Yes", 1, 0 )
VAR _D2 =
    IF ( table[Delivery2] = "Yes", 1, 0 )
VAR _D3 =
    IF ( table[Delivery3] = "Yes", 1, 0 )
VAR _D4 =
    IF ( table[Delivery4] = "Yes", 1, 0 )
VAR _Sum = _D1 + _D2 + _D3 + _D4
VAR _calc =
    DIVIDE ( _Sum, 4 )
RETURN
    _calc







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@Nathaniel_C  Thanks By Reply. 

This Solution to create a measure not work for me.  😞 
I received 2 Erros:
1 - The Sintax '0' are wrong and I delete this Value '0' at IF condictions and Receiveid other error: (Printed)
2 - One unic value for Collum Delivery1 "Assesment/Checklis" not could be determined...
PS> I change Yes to Sim (in Portuguese)

tempsnip.png

 

My Table:
My table.My table.

Hi @jrsaraiva 

IF ( table[Delivery1] = "Yes", 1, 0 )
VAR _D1 =
    IF (MAXtabela [Entrega1]) = "Sim", 1, 0) table = substitute your table name Delivery1 substitute each column name "Yes" substitute "Sim"

Also let us add MAX() to each line ----Também vamos adicionar MAX () a cada linha

VAR _D1 =
    IF ( MAX(table[Delivery1]) = "Yes", 1, 0 )

 

Se você ainda receber mensagens de erro, veja se pode copiar e colar no tradutor do Google




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@Nathaniel_C  Thanks! 

You can Write in English 🙂  No problem for me. I can Read.

 

Now are running! 😉 

I change 

VAR _D1 =
    IF (MAX( 'Status Implantação PMO'[Assessment/Checlist ]) = "Yes", 1, 0 )

to this: 

VAR _D1 =
    IF (MAX( '14 Status Implantação PMO'[Assessment/Checlist ]) = "Yes", 1;0 )

And are Working. 


Just one doubt....

Now  I have de measure by project (by line) if a need a % total (type of all projects ) it possible?

Hi @jrsaraiva ,

Yes we can.  Give me a few minutes on it. 

You are much better than me, The only thing I know is bom dia!

Ciao,
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.