Skip to main content

Distinct portfolio's

 

if AVG([Is Default])=0 THEN 

 

(IF AVG([Is Default]) = 0 THEN COUNTD([PortfolioId]) ELSE (COUNTD([Is Default])-1) END)

 

ELSE 0 END

 

Expected output added in the workbook Title please refer.

I am adding calculation Distinct count portfolioid where my condition if default = 0 then distinct count portfolioid else 0 endimage I need to get output without using filter is default column. other columns it will change values based on filter that shouldn't be.

is there any workaround to fix my calculation.

 

I have attached sample workbook.

5 respostas
  1. 25 de mai. de 2025, 09:53

    Well, the average of your [Is Default] field is never zero, so you'll always return the distinct count of IDs in the partition. If you want to count the number of IDs where the [Is Default] is zero, then you'd need to put that filter condition inside your count, i.e.

    COUNTD(IF [Is Default] = 0 THEN [Portfolioid] END)

    Well, the average of your [Is Default] field is never zero, so you'll always return the distinct count of IDs in the partition. 

0/9000