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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Percentage calculation

Hi all,

 

                           Pecentage calculation need to do for the report .

Calcualtion is for state with CA only.

Percenatge=( sum(value)/2000)*100

2000(constant value )

 

Screenshot 2022-11-28 155801.png

 

plse help?

 

 

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @Anonymous ,

 The measures below are one way to do this. You could combine the measures together in a single measure.

Please consider accepting as solution if this answers the question.

 
CA Total = CALCULATE(SUM(Table_[value]), FILTER(ALL(Table_),Table_[state]="CA"))
--This is the total value of all "CA" state rows
 
CA Value = CALCULATE(SUM(Table_[value]), FILTER(Table_,Table_[state]="CA"))
--This is the row value where state= "CA"
 
CA Percentage = DIVIDE([CA Value],[CA Total],0)
--This gets the percentage
 

djurecicK2_0-1669646024592.png

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Is this your expected output?

(122222+200000+300000)/2000*100=31111

vcgaomsft_0-1669700415694.png

If so, please try this measure:

Percenatge = 
VAR _total = CALCULATE(SUM('Table'[Value]),'Table'[State]="CA")
VAR _result = DIVIDE(_total,2000)*100
RETURN
_result

If I have misunderstood your needs, please feel free to contact us.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

djurecicK2
Super User
Super User

Hi @Anonymous ,

 The measures below are one way to do this. You could combine the measures together in a single measure.

Please consider accepting as solution if this answers the question.

 
CA Total = CALCULATE(SUM(Table_[value]), FILTER(ALL(Table_),Table_[state]="CA"))
--This is the total value of all "CA" state rows
 
CA Value = CALCULATE(SUM(Table_[value]), FILTER(Table_,Table_[state]="CA"))
--This is the row value where state= "CA"
 
CA Percentage = DIVIDE([CA Value],[CA Total],0)
--This gets the percentage
 

djurecicK2_0-1669646024592.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.