Forum Discussion
sieed
9 years agoHelper II
Dynamically compute a calculated column based on date slicer
I have two tables namely category and sales. The category table contains categoryName, categoryID, and subcategoryIDs (which is unique). The sales table contanis the subcategoryID and sales date. ...
Anonymous
9 years agoNot applicable
What happens if you use ALLEXCEPT like this:
New Category Name = IF(CALCULATE (
SUM ('category'[count of subcategoryID] ),
FILTER (
ALLEXCEPT ( 'category', 'category'[Date] ),
'category'[categoryID] = EARLIER('category'[categoryID])
)
) < 5, "Other", 'category'[category name])
Where 'category'[Date] is your date field and the date used in your slicer.
sieed
9 years agoHelper II
Anonymous, there is no category date in the category table. There i showever sales_date in the sales table. Do you want me to use that instead?