Forum Discussion
DAX Filtering and Identifying Multiples Across an Attribute
Hi Anonymous ,
If I understand correctly, the issue is that you want to filter on multiple Event Types. Please try the following methods and check if they can solve your problem:
1.Create the simple Table and Table 2.
2.Add Create a measure 2. Enter the following DAX formula.
Measure 2 =
var tmp=SELECTCOLUMNS('Table 2',"ET",[Event_Type])
var _str=CONCATENATEX(tmp,[ET],",")
var _a=SELECTEDVALUE('Table'[Audited])
var _b=SELECTEDVALUE('Table'[Invoiced])
var _c=SELECTEDVALUE('Table'[Event_Type])
return
IF(ISFILTERED('Table 2'[Event_Type]),IF(CONTAINSSTRING(_str,_c)&&_a="Y"&&_b="Y",1),1)
3.Move measure 2 to the filters.
4.Select the slicer visual and move the Table 2 Event_Type to the slicer.
5.Select the Emergency and Urgent, the result is shown below.
Looking forward to your reply.
Best Regards
Hi. Thanks for the reply. The idea is that the user will select two or more Even_Types. Then they would like to further filter to only include records that occure more than once within an given Event_ID for the selected Event Types.
I was thing of creating a column (like CountInEvent) that would calculate and update based on the even_type selection and then using that as a filter.
The key point is that if the user changes the Event_Types selected (via a slicer) the CountInEvent should change.
This would be what it would look like without filters.
If I filtered on Emergency and Routine it would look like the below (Since only these values have Audited and Invoiced set to Y)
Then I would filter on CountInEvent to only get values greater than 1.