Forum Discussion
Replicating Tableau Parameter/Filter in Power BI
- 2 years ago
Hi DKelso1992
To achieve the goal,
after you add field parameters please follow these steps :1. Add column to the parameters table:
2 . Create a flag measure for the desired filtering :
test =varsele_column=SELECTEDVALUE('Parameter'[selected column])returnSWITCH( TRUE(),sele_column="column 1" && max('Table'[Column 1])= 1 ,1,sele_column="column 2" && max('Table'[Column 2])= 1 ,1,sele_column="column 3" && max('Table'[Column 3])= 1 ,1,0)Put the "selected column" on the slicerand use a measure that you created as a filter to the roles visual:
result :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- 2 years ago
Hi, DKelso1992
Maybe you need to filter other visuals by the created flag measure too or to modify the model.
I don't think there is an option to answer this kind of question without access to the report file.
Please share a link to the dummy pbix and I will try to help.If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- 2 years ago
Hi DKelso1992
This is not working because all filter manipulations are from parameters.
The parameters are not the same functionality as the dim table with a "normal key".So as I see the solution here is:
1. To use all parameter manipulations directly from the fact table.
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi DKelso1992
Why do you need 3 different columns for this?
Can you please share a dummy table and the desired result?
- DKelso19922 years agoFrequent Visitor
Hi Ritaf1983
Each column relates to specific groups that the individual might be a member of, so for example a CEO could be a member of group 1,2 and 3. Where as an administrative assistant would only be a member of group 1.
I am unable to attach any files to this post (Done a Google search and seems to be a known issue https://community.fabric.microsoft.com/t5/Desktop/how-to-attach-pbix-file-in-this-forum/td-p/404432)
I have included some data in a table below which may be of some help, basically when a user selects "Column 1" as an option from a parameter, it should show data relating to all job roles. Select Column 2, it should only show data relating to Job roles with a 1 in column 2, and selecting Column 3 in the parameter should only show data relating to CEO and CFO.
Thanks in advance,
DanielRole Column 1 Column 2 Column 3 Chief executive officer 1 1 1 Chief financial officer 1 1 1 Chief information officer 1 1 Chief marketing officer 1 1 Chief operations officer 1 1 Human resources manager 1 IT Manager 1 Marketing manager 1 Product manager 1 Sales manager 1 Administrative assistant 1 - Ritaf19832 years ago
Super User
Hi DKelso1992
To achieve the goal,
after you add field parameters please follow these steps :1. Add column to the parameters table:
2 . Create a flag measure for the desired filtering :
test =varsele_column=SELECTEDVALUE('Parameter'[selected column])returnSWITCH( TRUE(),sele_column="column 1" && max('Table'[Column 1])= 1 ,1,sele_column="column 2" && max('Table'[Column 2])= 1 ,1,sele_column="column 3" && max('Table'[Column 3])= 1 ,1,0)Put the "selected column" on the slicerand use a measure that you created as a filter to the roles visual:
result :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- DKelso19922 years agoFrequent Visitor
Hi Ritaf1983
Thank you for that solution, it works that the parameter filters the table containing the job role and the column 1/2/3, however I have a table which it is linked to which contains the data used to create the main visualisations. It appears that parameter selections are not impacting on this main data despite a relationship existing between the two (based on job role). Do you have any suggestions?
Thanks
Daniel