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
niemis
Helper I
Helper I

Create Calculation/Measure that will count the number of a Change Type

I have a field in my data titled Change Type, and there are three options - Normal, Standard and Emergency.  I'm trying to create a measure/calc that will provide me the count of each option, so that I can get a percentage of the total number of changes. 

 

Any help would be awesome!!  

Thank you.

1 ACCEPTED SOLUTION

samratpbi_0-1710511479789.jpeg

As in above pic, Emergency has 3 rows / count out of total 9 rows / count, hence showing 3/9 = 33.33% and so other categories

View solution in original post

6 REPLIES 6
niemis
Helper I
Helper I

Thank you @samratpbi !  It was my error.  Works perfectly!!!!

samratpbi
Super User
Super User

Hi,

Lets consider your data is like below:

Change Type Products
Normal    P1

Normal    P2

Standard P3

Standard P4

Standard P5

Standard P6

Emergency P7

Emergency P8

Emergency P9

Now, create below measures:
Count Distinct Products = DISTINCTCOUNT(table[Products])
Count All = CaLCULATE( [Count Distinct Products], ALL(table[Change Type])
Then your % calculation:
Count Pct = DIVIDE([Count Distinct Products], [Count All])

Thank you @samratpbi .  This gives me just the number 1, 1.00%, an 1, respectively.  

 

I have roughly 100 changes, most are normal type, but I am trying to determine what percent of those are standard and emergency.  

 

 

You need to use the last measure in the report and also format it as a percentage field

@samratpbi Thanks.  Maybe I am just not understanding.  So I'd like to be able to show that normal changes are x% of total changes

standard changes are x% of total changes

emergency changes are x% of total changes. 

 

 

samratpbi_0-1710511479789.jpeg

As in above pic, Emergency has 3 rows / count out of total 9 rows / count, hence showing 3/9 = 33.33% and so other categories

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors