Skip to main content
|

PowerPivotPro's FAQ Site

Go Search
  
PowerPivotPro's FAQ Site > The Great PowerPivot FAQ > How can I calculate a DISTINCT COUNT measure?  

The Great PowerPivot FAQ: How can I calculate a DISTINCT COUNT measure?

Title

How can I calculate a DISTINCT COUNT measure? 

Answer

There is no a native distinct count aggregation in PowerPivot (like SUM, MIN, MAX, COUNT, …) but you can easily get that number in MDX by using COUNTROWS( DISTINCT( Table[Column] ) ) formula in DAX.
 
A description of how to add a calculated measure in this way is available here:
 

Client/Server

Client 

Topic

F - Calculations (DAX) 

Purpose

Information 

Answered?

Yes 

Contributor

Marco Russo 

Título

Como eu posso calcular uma medida DISTINCT COUNT 

Resposta

Não há uma agregação DISTINCT COUNT nativa no PowerPivot (como SUM, MIN, MAX, COUNT, …) mas você pode facilmente conseguir este número em MDX atravé da seguinte fórmula em DAX: COUNTROWS( DISTINCT( Table[Column] ) ).
 
Uma descrição de como adicionar uma medida calculada desta maneira é mostrada aqui (em inglês):
 

Frage

Wie kann ich eine Kennzahl, die nur die unterschiedlichen/distinct Werte enthält, erzeugen? 

Antwort

 

preRTM

 
Attachments
Created at 1/4/2010 12:05 PM  by admin@powerpivotfaq.com 
Last modified at 4/23/2010 1:24 PM  by Jochen Juelke