Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello, good morning.
I would like to know if there is any way to apply a filter on a result that has been applied to it before.
I have two queries:
1. NOTIFICATIONS
2. RESIDENTS
What I want to accomplish is that when I filter on Person ID , I get the Communication data Comunicación (See Notifications [ID][DT_Notificacion][ DT_Prueba] [DT_Sintima] [DT_Cuarentena] and Resident Consultation [Plant]. And in two tables next to having the information of the other IDs of people who shared the same Residence and the same Plant, but that this is done automatically when I select the Person ID filter. ID de Persona.
So it is currently but I have to manually add the residence and the plant to the two tables:
I would like to know if it is possible to automatically put the Residence and Plant that is filtered anteriomente when selecting the person ID:
Thank you very much in advance.
Solved! Go to Solution.
Hello @Dulce_Gamez4 ,
I think you need to have all the tables filtered by the ID, so I did the following:
Residencia_Selection =
VAR Selected_Person =
VALUES ( IDPERSONA[IDPERSONA] )
VAR tempTable =
FILTER (
ALL ( Residentes[IDPERSONA]; Residentes[Planta]; Residentes[RESIDENCIA] );
Residentes[IDPERSONA] IN Selected_Person
)
VAR Columns_selection =
SELECTCOLUMNS ( tempTable; "Resi"; Residentes[RESIDENCIA] )
VAR FIlter_Residents =
FILTER ( ALL ( Residentes ); Residentes[RESIDENCIA] IN Columns_selection )
VAR Filter_Persons =
FILTER (
FIlter_Residents;
Residentes[IDPERSONA] = SELECTEDVALUE ( Residentes[IDPERSONA] )
)
RETURN
MAXX ( Filter_Persons; Residentes[IDPERSONA] )
Planta_Selection =
VAR Selected_Person =
VALUES ( IDPERSONA[IDPERSONA] )
VAR tempTable =
FILTER (
ALL ( Residentes[IDPERSONA]; Residentes[Planta]; Residentes[RESIDENCIA] );
Residentes[IDPERSONA] IN Selected_Person
)
VAR Columns_selection =
SELECTCOLUMNS (
tempTable;
"Residencia_selection"; Residentes[RESIDENCIA] & Residentes[Planta]
)
VAR FIlter_Residents =
FILTER (
ADDCOLUMNS (
ALL ( Residentes );
"Residencia_Planta"; CONCATENATE ( Residentes[RESIDENCIA]; Residentes[Planta] )
);
[Residencia_Planta] IN Columns_selection
)
VAR Filter_Persons =
FILTER (
FIlter_Residents;
Residentes[IDPERSONA] = SELECTEDVALUE ( Residentes[IDPERSONA] )
)
RETURN
MAXX ( Filter_Persons; Residentes[IDPERSONA] )
This measure then has filters on the tables, and then hide the segmentation based on the disconnected table.
Using this option you can have multiple user selections, keep in mind that the trick here is to synchronize both altough slicers that are in disconnected tables.
In the PBIX file I present both slicers, but you must hide one in the final version of the report.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |