Forum Discussion
sarthsla
6 months agoFrequent Visitor
Count as per Area
Hi All, I have below data in Table Visual in PBI desktop, where StatusMeasure is generated dynamically based on ID and few conditions No when I want to count the Distinct IDs for each Area an...
- 6 months ago
Thanks I resolved it by myself with help of DAX using KEEEPFILTERS
GeraldGEmerick
6 months agoSuper User
sarthsla To do this, you generally need to use a table with no relationships that has a row for every potential value of your measure. You use that in your legend and then write DAX similar to the following for the distinct count:
StatusMeasure Count =
VAR _Legend = MAX( 'Legend Values'[Value] ) // this is your table with no relationships Yes/No
VAR _Table = DISTINCT( SELECTCOLUMNS( FILTER( ADDCOLUMNS( 'Table', "Status Measure", [StatusMeasure] ), [Status Measure] = _Legend ), "ID", [ID] ) )
VAR _Return = COUNTROWS( _Table )
RETURN _Return
sarthsla
6 months agoFrequent Visitor
its showing all counts of IDS but not distinct counts for area
- v-tejrama6 months agoCommunity Support
Hi sarthsla ,
Thank you cengizhanarslan for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.