Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if(Release='2015'
or Release='2016'
or Release='2014'
and ( Release <> '2017' and Release <> '2018') , count(distinct(Product_Name)))
I want count number of products that have releases before 2017 but does not have releases after 2017
What is wrong with my script here? I won't work. please help.
Hello David,
How about this (I assume you want to use this as a chart expression):
count({$<Release={">=2014<2017"}>} DISTINCT Product_Name)
BR,
Kuba
load count Distinc Product_Name as Qtd
from ... where
Release='2015'
or Release='2016'
or Release='2014'
and ( Release <> '2017' and Release <> '2018')
Hello David,
How about this (I assume you want to use this as a chart expression):
count({$<Release={">=2014<2017"}>} DISTINCT Product_Name)
BR,
Kuba
Maybe like
Exclude:
LOAD Product as ProductToExclude
FROM YourtableSource
WHERE Release >=2017;
Result:
LOAD Count(DISTINCT Product) as ProductCount
FROM YourTableSource
WHERE NOT EXISTS( ProductToExclude, Product)
AND Release < 2017;
DROP TABLE Exclude;
yes I want to do it in chart expression. but in my real data there are releases that are named with character not just with numbers. can I specifically name them? not using range of number of years?
This will count all product_name, but only from 2017:
count({$<Release={'2017'}>} DISTINCT Product_Name)
This for example will count all, without those released in 2017 & 2018
count({$<Release={*}-{'2017','2018'}>} DISTINCT Product_Name)
Check below to get more info: