Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all, I have Table A below:
| Doc Number | Item |
| No.1 | A |
| No.1 | B |
| No.2 | A |
| No.3 | B |
| No.3 | C |
| No.4 | A |
| No.4 | C |
I would like to get the Document number that contains item A,
but if i filter this table with ITEM = "ITEM A", the result will be:
| Doc Number | Item |
| No.1 | A |
| No.2 | A |
| No.4 | A |
However, My desired output is the table to filter Doc number that contains Item A, so the output will still display Doc No.1 with Item B.
| Doc Number | Item |
| No.1 | A |
| No.1 | B |
| No.2 | A |
| No.4 | A |
| No.4 | C |
I have tried with countrows filtering which does not work, any advice?
Solved! Go to Solution.
You could create a measure like
Document is visible =
VAR CurrentDocument =
SELECTEDVALUE ( 'Table A'[Document number] )
VAR DocsWithItemA =
CALCULATETABLE (
VALUES ( 'Table A'[Document number] ),
REMOVEFILTERS (),
'Table A'[Item] = "A"
)
RETURN
IF ( CurrentDocument IN DocsWithItemA, 1 )
and use that as a visual level filter on your table
You could create a measure like
Document is visible =
VAR CurrentDocument =
SELECTEDVALUE ( 'Table A'[Document number] )
VAR DocsWithItemA =
CALCULATETABLE (
VALUES ( 'Table A'[Document number] ),
REMOVEFILTERS (),
'Table A'[Item] = "A"
)
RETURN
IF ( CurrentDocument IN DocsWithItemA, 1 )
and use that as a visual level filter on your table
Thanks ! work like charm!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.