cancel
Showing results for 
Search instead for 
Did you mean: 

Shannon Entropy

Super User IV
1364 Views
Super User IV
Super User IV

Shannon Entropy

Given a column with a list of values, computes the Shannon Entropy for that set of values. The single measure version of this is:

 

 

ShannonEntropy = 
SUMX(
          SUMMARIZE(
                    Entities,
                    Entities[Entity],
                    "H(X)",
                    -1*COUNTROWS(Entities)/COUNTROWS(ALL(Entities))*LOG(COUNTROWS(Entities)/COUNTROWS(ALL(Entities)),2))
          ,[H(X)])

There is a single input, a column, in this case called Entities[Entity].

 

 

 

 


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!