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
bdino
Regular Visitor

convert value of count to percentage per month

Hi, please help to convert the value of count to percentage per month on my below table 

 

bdino_1-1597202866614.png

 

 

here's  my sample data

bdino_0-1597202798142.png

 

1 ACCEPTED SOLUTION

@bdino 

Please try this

1.PNG

Measure = COUNTROWS('Table (2)')/CALCULATE(COUNTROWS('Table (2)'),ALLEXCEPT('Table (2)','Table (2)'[Resolved],'Table (2)'[Has breached]))

2.PNG

Since, you only show the year and month in the resolved column , I am not sure if the day values are the same. If not the same.

you can create a new column

new resolved = year('Table (2)'[Resolved])&month('Table (2)'[Resolved])

then create measure

Measure 2 = 
COUNTROWS('Table (2)')/CALCULATE(COUNTROWS('Table (2)'),ALLEXCEPT('Table (2)','Table (2)'[new resolved]))

2.PNG

 

 

 





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
FarhanAhmed
Community Champion
Community Champion

 

 

Try this 

 

% Count = COUNT(Table[Has Breached]) / CALCULATE(COUNT(Table[Has Breached]),ALLSELECTED(Table))

 

Make sure that you change the  formatting of measure to Percentage 







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

Proud to be a Super User!




amitchandak
Super User
Super User

@bdino , Try measures like

Breached % =Divide(calculate(countrow(Table), Table[Breached]= True()),calculate(countrow(Table)))
Not Breached % =Divide(calculate(countrow(Table), Table[Breached]= False()),calculate(countrow(Table)))

 

At you using threshold as 85. You have multiple above100

syntax error The syntax for 'Table' is incorrect. (DAX(Divide(calculate(countrows(Table), Table[has Breached]= True()),calculate(countrows(Table))))).

@bdino 

Please try this

1.PNG

Measure = COUNTROWS('Table (2)')/CALCULATE(COUNTROWS('Table (2)'),ALLEXCEPT('Table (2)','Table (2)'[Resolved],'Table (2)'[Has breached]))

2.PNG

Since, you only show the year and month in the resolved column , I am not sure if the day values are the same. If not the same.

you can create a new column

new resolved = year('Table (2)'[Resolved])&month('Table (2)'[Resolved])

then create measure

Measure 2 = 
COUNTROWS('Table (2)')/CALCULATE(COUNTROWS('Table (2)'),ALLEXCEPT('Table (2)','Table (2)'[new resolved]))

2.PNG

 

 

 





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

Proud to be a Super User!




Hi ryan_mayu Thanks! issue resolve.. 

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.