Forum Discussion
How to Retrieve data dynamically based on user selection
- 1 year ago
In Power BI, not selecting anything from the filter is the equivalent of showing everything (i.e. you are not filtering). If you want it so that when a selection is made only 1, 2, 4, 5 show up - the user would select INCLUDE. If they select EXCLUDE it would show 3. No filter show 1, 2, 3, 4, 5. You can change the verbiage and have include be exclude and vise versa, but to show all items - you filter nothing.
Hello! Create a table with all departments listed. Put EXCLUDE in the column next to the name of the department you want to work as the exclude. You can put INCLUDE for the rest. Join this table to your fact table on department. In the report, if you use the include/exclude filter if a user selects nothing it will show them everything. If they select include it will show only the departments you have as include. If they select exclude it will only show those items marked as exclude.
Thanks audreygerred! The "include" will include all departments. See we have department 1,2,3,4,5. Wirh include, it need to show all data from department 1,2,3,4,5. With exclude, it will show 1,2,4,5 ( to exclue department 3 only). So the solution you provided will not work. Thnks anyway.
- audreygerred1 year agoSuper User
In Power BI, not selecting anything from the filter is the equivalent of showing everything (i.e. you are not filtering). If you want it so that when a selection is made only 1, 2, 4, 5 show up - the user would select INCLUDE. If they select EXCLUDE it would show 3. No filter show 1, 2, 3, 4, 5. You can change the verbiage and have include be exclude and vise versa, but to show all items - you filter nothing.
- Ashish_Mathur1 year agoSuper User
HI,
In the table which has departments, create another column which shows include/exclude in each row. Create an include/exclude slice from this new column.