Forum Discussion
Dynamic Column Slicer for Category Columns
I've seen a few solutions for this however they don't seem to work for categories (only for numbers that can be aggregated).
Essentially I'd like to create a column that populates either titles or categories based on the results of a user using a slicer. This column would then be used in various graphs, to dynamically change what is displayed in the graph.
Here is what I've done so far, and the errors that I've received:
Created Index Table: CatVrsTitle
Index | Measure
1 | Category
2 | Title
Added Measure to table TimeEntry
Measure Selection =
SWITCH(TRUE(),
VALUES(CatVrsTitle[Measure]) = "Title", TimeEntry[Title],
VALUES(CatVrsTitle[Measure]) = "Category", TimeEntry[Category],
BLANK())
error: A single value for column 'Category' in table 'TimeEntry' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
note: These are categories, so there shouldnt be any aggregation. I also tried this as a column but got the same error
Created slicer based on Measure value in the table CatVrsTitle
2 Replies
- Greg_DecklerCommunity Champion
Check out the SELECTEDVALUE function, that should allow you to do what you want.
- teresadannaFrequent Visitor
Apologies, I'm still pretty green with this stuff. I switched VALUES() for SELECTEDVALUE() and got the same error although I think I'm doing it wrong.