Forum Discussion
rajeshapunu1234
Helper I
2 years agoFinding the common item from the multiples category
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 dis...
- 2 years ago
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] )
Jihwan_Kim
Super User
2 years agoHi,
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]
)
rajeshapunu1234
Helper I
2 years agoHi
now have anothre need
i want to have the count of the common items
can you please give me dax to it