Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Dear team,
I am having a situation like i am having Table name called category and which table is having category and item column
the category column and many caterogy and each category have distint items
now i wanted to have the items which is available in all the categery and that should be dynamic like whenver i am selecting the multiple category in slicer i should view the common tests only which is available in selected category
can someone guide me here to acheive it?
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
expected result measure only item: =
VAR _categorycount =
COUNTROWS ( ALLSELECTED ( Data[Category] ) )
VAR _currentcategory =
VALUES( Data[Category] )
VAR _currentitem =
SELECTEDVALUE ( Data[Item] )
VAR _t =
ADDCOLUMNS (
ALLSELECTED ( Data ),
"@count", COUNTROWS ( FILTER ( ALLSELECTED ( Data ), Data[Item] = _currentitem ) )
)
RETURN
SUMX (
FILTER (
_t,
Data[Category] in _currentcategory
&& Data[Item] = _currentitem
&& [@count] = _categorycount
),
[@count]
)
This my table below is the screen where i followed your instruction
but i am not getting proper result
can you please guid me here
Hi Jiwan Kim
you understood my point very clearly and it is working now
Thanks for your support
adding to that is it possible to get the item name seperately whithc distinct without package name
Only common item name (distinct) should show whenever selectes the packes in the slicer
thanks
Hi,
Please check the below picture and the attached pbix file.
expected result measure only item: =
VAR _categorycount =
COUNTROWS ( ALLSELECTED ( Data[Category] ) )
VAR _currentcategory =
VALUES( Data[Category] )
VAR _currentitem =
SELECTEDVALUE ( Data[Item] )
VAR _t =
ADDCOLUMNS (
ALLSELECTED ( Data ),
"@count", COUNTROWS ( FILTER ( ALLSELECTED ( Data ), Data[Item] = _currentitem ) )
)
RETURN
SUMX (
FILTER (
_t,
Data[Category] in _currentcategory
&& Data[Item] = _currentitem
&& [@count] = _categorycount
),
[@count]
)
Hi
now have anothre need
i want to have the count of the common items
can you please give me dax to it
Sir thank you so much your DAX function working as per my expectation
so now i can get the common item from the selected category by clicing the filter "is not blank"
and i can get the other then the common items like the item can be available in both but not not matching
is it possible to take the item which is not available in the both categery by using this dax
if possible please let me know how can acheive it
thanks
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
expected result measure: =
VAR _categorycount =
COUNTROWS ( ALLSELECTED ( Data[Category] ) )
VAR _currentcategory =
SELECTEDVALUE ( Data[Category] )
VAR _currentitem =
SELECTEDVALUE ( Data[Item] )
VAR _t =
ADDCOLUMNS (
ALLSELECTED ( Data ),
"@count", COUNTROWS ( FILTER ( ALLSELECTED ( Data ), Data[Item] = _currentitem ) )
)
RETURN
SUMX (
FILTER (
_t,
Data[Category] = _currentcategory
&& Data[Item] = _currentitem
&& [@count] = _categorycount
),
[@count]
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 44 | |
| 42 | |
| 19 | |
| 19 |
| User | Count |
|---|---|
| 72 | |
| 67 | |
| 33 | |
| 32 | |
| 31 |