Forum Discussion
Count selected IDs with filtering removed
Hi,
Data like this:
creates a matrix like this;
and when ckicked a table like this:
I want to create a measure that counts the IDs 2 or 3 for the different date and stage, so I can visualise it like this:
In DAX I can use the following code, but struggle how to define the VAR selected_ids dynamically. I tried to use VALUES on the [ID], but it selects alll the possible IDs.
Thanx!
7 Replies
- amitchandakSuper User
WJ_WJ , Try if this solution can help
Power BI Partial Interactions, Selectively pass filter across visuals - https://youtu.be/SFEKQEic_sk
- WJ_WJRegular Visitor
Thx for your reply, but Im looking for a fully DAX solution. Should be possible...
- AnonymousNot applicable
I'm not sure why you'd always want just id 2 and 3, you could use a slicer for a dynamic selection but if you want it hardcoded try:
Test =
VAR _table = FILTER('stagesTbl',
'stagesTbl'[id] = 2 || 'stagesTbl'[id] = 3)
RETURN
COUNTX(_table, COUNT('stagesTbl'[id]))