Forum Discussion

sorayausher's avatar
sorayausher
New Member
2 years ago

Divide two distinct count values returning 1

Hi,

 

I am having an issue when I try to create a measure to divide 2 distinct count values. The measure appears to be working in the totals, but when trying to break it down into further categories, the only value I get is 1.

 

The measure I am using is:

 

DIVIDE(CALCULATE(DISTINCTCOUNT('All data_IT'[Data 1.Clnt_Id]),FILTER('All data_IT','All data_IT'[Data 1.Group_tax_outcome]<>"incurred accounting loss")),
DISTINCTCOUNT('All data_IT'[Data 1.Clnt_Id])
 
And these are my results

 

How do I make the values display the correct decimals?

 

Is there an issue with my DAX?

 

Thanks

 

 
 
 

 

 

4 Replies

  • aduguid's avatar
    aduguid
    Icon for Memorable Member rankMemorable Member

    What is the data type of the measure? If it's set to "Whole Number", that could be your problem.

    Make sure it's set to "Decimal Number".

     

    • sorayausher's avatar
      sorayausher
      New Member

      Thank you, but the data type of the measure is already set to decimal number.

      • aduguid's avatar
        aduguid
        Icon for Memorable Member rankMemorable Member

        Try this measure

         

        Measure = 
        	DIVIDE(
        		  CALCULATE(DISTINCTCOUNT('All data_IT'[Data 1.Clnt_Id]), 'All data_IT'[Data 1.Group_tax_outcome] <> "incurred accounting loss")
        		, DISTINCTCOUNT('All data_IT'[Data 1.Clnt_Id]
        	)