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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
cmajewski
Frequent Visitor

Calculate text values in a single column

So what I want to do is some basic math with a column. I want to take the following text values:

MC+EP-NH+RV that are in a single colum, and want to be ablet calculate it basd on that expression as well as be able to get the count of each as also get the % based on of all the values in the column.

I have tired creating a column and then assigning numbers to these text values, but there are a lot of different values so it would make it too long. What I could do is assign values to the MC, EP, NH, & RV and then all others are one value. But I don't know how to write that or how I would be able to get it to calculate the proper total if I am assigning values?

4 REPLIES 4
FrankAT
Community Champion
Community Champion

Hi @cmajewski 

is this what you are looking for? Here are some basic calculations:

 

04-11-_2020_16-37-57.png

 

Count = COUNT('Table'[Data])

% Percentage = DIVIDE([Count],CALCULATE([Count],ALL('Table')))

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

I was able to create the count measure without issue. Howver,I stil cannot get how to do do the basic math by subtracting and adding values in the column.

Hi @cmajewski ,

 

Sorry but I'm a little confused by the description,could you pls make some examples and advise me your expected output?

 

Best Regards,
Kelly

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

Okay I see. Although what I want to do is take MC+EP-NH+RV = value 

Then take that value and give me the % for all the values in the column as there are others, like COCL1, HUCL1, etc.

 

Also this data is already in a column called "Placement Ops" so where you have table do I put Count = Count('Table''[Placement Ops]?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.