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

Count Distinct for A Kpi

Hi Guys

Need your help if you can:

I am struggling with a measure I am trying to create.


In order to count the number of customers who are within their ordering frequency I have use the following:


if(Aggr(max([Last Order Date]),

[CustNo/CustName])+ sum(CustomerDays)/sum(OrderCounter)>today(),

count(distinct(SECURED_CustomerContactKey)),0)


“Aggr(max([Last Order Date]),[No/Name])+ sum(CustomerDays)/sum(OrderCounter)” uses the “Last Order Date” to establish when the customers are next due to order.


This works fine within a table visual however I would like to display the count as a KPI visual so the If statement does not work.


What is the best way for me to achieve this count?


Thanks

2 Replies
OmarBenSalem

it works in a table when there is a dimension:

so add this dimension in ur expression :

AGGR(YourExpression,YourDimension)

Anonymous
Not applicable

In your data model is CustNo a key field used to join 2 or more tables ?