Forum Discussion
Total distinctive
To one extent I have calculated:
I have the distinctive count of stores that had sales greater than zero, this for a string field.
I would like to get in a table the total or sum of the stores, since it is giving me back the sum of the total.
I'd really appreciate your help. Best regards
- Anonymous5 years ago
Hi Syndicate_Admin ,
Based on your description, you can create a measure as follows.
I did a test.
Measure 4 =
var x1=CALCULATE(DISTINCTCOUNT('test for sales'[Store]),FILTER(ALL('test for sales'),[Sales]<=0))
var x2=DISTINCTCOUNT('test for sales'[Store])
return
x2-x1Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandakSuper User
Syndicate_Admin , Not very clear
see if these measures can help
Store sales >0 = count(filter(values(Table[Store]), CALCULATE(sum(Table[Sales])) >0),[Store])
Store Sales when sales >0 = sumx(filter(values(Table[Store]), CALCULATE(sum(Table[Sales])) >0),CALCULATE(sum(Table[Sales])))
- Syndicate_AdminAdministrator
Hello, shows me error in the count, I have the following measure:
CALCULATE(DISTINCTCOUNT(FACT_SALE_VIEW[Store]),FILTER(FACT_SALES_VIEW,FACT_SALE_VIEW[sales]>0))*by putting it on the table the total does not show me the sumI'd appreciate your help. Best regards.
- AnonymousNot applicable
Hi Syndicate_Admin ,
Based on your description, you can create a measure as follows.
I did a test.
Measure 4 =
var x1=CALCULATE(DISTINCTCOUNT('test for sales'[Store]),FILTER(ALL('test for sales'),[Sales]<=0))
var x2=DISTINCTCOUNT('test for sales'[Store])
return
x2-x1Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.