Forum Discussion

ScottGM's avatar
ScottGM
New Member
2 years ago

Select Data based on slicer selection

Hi everyone,

 

This has been doing my head in for a while and I wonder if I could get some advice.

 

I have 5 Data sets, each sharing the same columns but have different values based on a Type of company.
What I want to do is have a slicer for Types A,B,C,D Where selecting type A would bring in data from Dataset A, type B from Dataset B and so on and put selected columns in to a visual.
Lastly, if nothing is selected, I would want the table to show data from Dataset E.

For example:
Lets say Type A is for Small companies.
If I select Type A in the slicer: I want to return Sales and profit in a table visual using data from my Small Companies dataset (These figures are in the dataset already). And so on for Type B, C, D etc. And finally Type E will be a default if nothing is selected in the slicer.

I hope this makes sense!

Thank you.

1 Reply

  • Are you able to union the datasets in PowerQuery (since they share the same column names). Then you can simply create the report as usual using the UnionedTable, and put a slicer in to select the company. 
    I'm not sure about the details of your report, but you can use a slicer with the single-select option to make sure that you won't have to do any extra code to handle the case where nothing is selected.