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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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