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êsHi @Anonymous ,
How do you have the relationship between tables? In theory if you have a dimension table with the Residencia and Planta tha makes the relationship between the two table you should be abble to select the slicer and the tables below update.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHere is the new link to download the pbix.
-OneDrive
-Drive
https://drive.google.com/drive/folders/17cKFp6sk1di1PK4d2XrpjUSOoG_lnOH9?usp=sharing
Thanks a lot.
Thank you for your answer, I tried to create the dimension table but I still can't make it work.
I have created a simplified pbix
Thank you very much!
This is possible but fyi that your pbix file has multiple errors in the visuals. Please attach a version w/o those. To do this, a measure that checks the Residencia and Planta match the ones for the selected person, and then use that measure to filter the visuals in the filter panel.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hello @mahoneypat, thankyou for your response,
I tried to create the new measure, but it doesn't work 😞
MedidaResidencia ?
var PersonSeleted ? SELECTEDVALUE(Residents[IDPERSONA])
var Residence ? CALCULATE(MAX(Residents[RESIDENCIA]), FILTER(ALLSELECTED(Residents),Residents[IDPERSONA]-PersonSeleted))
Return
IF(MAX(Residents[RESIDENCE]) - Residence ,1, 0)
Here's the link to the new pbix
-OneDrive
-Drive
https://drive.google.com/drive/folders/17cKFp6sk1di1PK4d2XrpjUSOoG_lnOH9?usp=sharing
Thank you for your help
Hi @Anonymous ,
The link does not work.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI'm sorry, I don't know what is happening 😕
Here you have the new link:
-OneDrive
-Drive
https://drive.google.com/drive/folders/17cKFp6sk1di1PK4d2XrpjUSOoG_lnOH9?usp=sharing
Thank you !!
Here is one way to do this.
1. Make a disconnected table with your ID values with
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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êsThanks a lot! worked 🙂
User | Count |
---|---|
130 | |
108 | |
101 | |
67 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |