Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
87 | |
80 | |
69 | |
69 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |