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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ponchibonosrzt
Frequent Visitor

natural logarithm as a measure

Hi everybody

 

I have a table with number of records  of species "Cuenta" in a sample. I want to aplicate the natural logarithm (LN) to each of them and I use this DAX: 

Medida = LN(SUM(Hoja1[cuenta]))
 
I insert "Medida" in a matrix visualization, but the problem is the Total value is not the sum of the individual values of "Medida", instead is the calculation of LN for the Total of the column "Cuenta" =(LN(40)). 
 
How can I make the total shows the sum of all “Measure” values? (0.00+0.69+0.00+1.10+3.04+0.69+2.20+0.00 = 7.73)
 
ponchibonosrzt_0-1725922705459.png

Thanks in advance

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

write another measure like this

=SUMX(VALUES('yourtable'[especie]),[Medida])

 

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

write another measure like this

=SUMX(VALUES('yourtable'[especie]),[Medida])

 

AmiraBedh
Super User
Super User

Try the following :

 

Medida = 
IF(
    HASONEVALUE(Hoja1[SpeciesColumn]),  -
    LN(SUM(Hoja1[cuenta])), 
    SUMX(VALUES(Hoja1[SpeciesColumn]), LN(SUM(Hoja1[cuenta])))  
)

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Kudoed Authors