Forum Discussion
Filter to only show unique values
- 4 years ago
Hey Roym ,
you can create a mesure that is checking if the item in each row contains a "Medium" value. Then you can filter the visual by that measure.
I created the following measure:ItemsWitoutMedium = VAR vFilteredTable = FILTER ( ADDCOLUMNS ( -- Get unique values from [Item] VALUES ( myTable[Item] ), -- Count for each item the number of rows that contain "Medium" "@HasMediumVAlue", CALCULATE ( COUNTROWS ( myTable ), myTable[Classification] = "Medium" ) ), -- Filter for [Items] without "Medium" values [@HasMediumVAlue] = BLANK () ) RETURN -- return a 1 if the item has no "Medium" COUNTX ( vFilteredTable, IF ( [@HasMediumVAlue] = BLANK (), 1) )And then you can filter the visual:
I uploaded my example file to this post.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Hey Roym ,
you can create a mesure that is checking if the item in each row contains a "Medium" value. Then you can filter the visual by that measure.
I created the following measure:
ItemsWitoutMedium =
VAR vFilteredTable =
FILTER (
ADDCOLUMNS (
-- Get unique values from [Item]
VALUES ( myTable[Item] ),
-- Count for each item the number of rows that contain "Medium"
"@HasMediumVAlue", CALCULATE ( COUNTROWS ( myTable ), myTable[Classification] = "Medium" )
),
-- Filter for [Items] without "Medium" values
[@HasMediumVAlue] = BLANK ()
)
RETURN
-- return a 1 if the item has no "Medium"
COUNTX ( vFilteredTable, IF ( [@HasMediumVAlue] = BLANK (), 1) )
And then you can filter the visual:
I uploaded my example file to this post.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
- Roym4 years ago
Helper IV
Great! this works perfectly, thanks!!