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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Augustas-ase
Helper II
Helper II

Formula

how to calculate and get percentages in a column?

Augustasase_0-1686306955917.png

 

31 REPLIES 31

can you write how to have be?

Try this out
2Sale2s =
VAR _total =

Calculate(

SUM('Planam'[Sales]),
Filter('Planam','Planam'[month] = Earlier('Planam'[month]))

)

var _val = 'Planam'[Sales]
return
_val/_total

or how can i multiply this? sales 2022 x %ct sales 2022 

Augustasase_0-1686309623299.png

 

For any calculations you need to use calculated columns or measure

how to calculate measure? then for example, Sales 2022 value: cow is 544,385, and how to measure i can get percentage 43,06?

 

You got a column sales 2022 with value 544,385
Then you have a create an other calculated column for to get 43.06%
Formula for the column is :-
#column =
VAR _total = SUM([Sales 2022])
VAR _val = [Sales 2022]
RETURN
ROUND((_val / _total)*100,2)
then later you can use the #column For other calculations

 

i get error: The SUM function only accepts a column reference as the argument number 1.

Augustasase_0-1686552322874.png

bad;/

You can also use the same DAX in order to create a measure

darkinvader_
Resolver I
Resolver I

Hi @Augustas-ase 

So let me assume "Category" is the only column on your table visual and "Sales" is the factuals.

DAX formula below:

 

% Sales = 
var _sumOfSales = Sum(Table'Sales')

var _percent = Calculate(_sumOfSales,ALL(Table'Category))

 

return

 

_sumOfSales/_percent

 

(put your columns accordingly and change the data presentation to %)


Please do hit like if this provides you with a solution

Regards

darkinvader

 

i cant use Sum, becouse is measure

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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