Forum Discussion
Union multiple sliced tables
Hi!
My requirement is as follows. I have multiple tables that have no direct relationships, but are all related to one table 'Type' 1:*. They need to be sliced independent of each other. Those sliced tables then need to be unioned into one table. Hopefully the below shows what I'm trying to do. The data is all made up.
Table 1
Slicer value of 'Drink' applied
| Type | Option | Amount |
| Drink | Coffee | 2 |
| Drink | Tea | 2 |
| Drink | Milk | 3 |
| Drink | Orang Juice | 4 |
Table 2
Slicer value of 'Bread' applied
| Type | Option | Amount |
| Bread | White | 5 |
| Bread | Brown | 4 |
| Bread | Rye | 7 |
| Bread | Sourdough | 4 |
Table 3
Slicer value of 'Cheese' applied
| Type | Option | Amount |
| Cheese | Cheedar | 2 |
| Cheese | Blue | 3 |
| Cheese | Brie | 5 |
| Cheese | Edam | 6 |
Requirement
| Type | Option | Amount |
| Drink | Coffee | 2 |
| Drink | Tea | 2 |
| Drink | Milk | 3 |
| Drink | Orang Juice | 4 |
| Bread | White | 5 |
| Bread | Brown | 4 |
| Bread | Rye | 7 |
| Bread | Sourdough | 4 |
| Cheese | Cheedar | 2 |
| Cheese | Blue | 3 |
| Cheese | Brie | 5 |
| Cheese | Edam | 6 |
Hi Anonymous ,
It's not clear to me, I think you could append three tables and then use Slicer, or create new table to union them, as follows:
a)append three table and Select the three types.
b) Or create new table
new table = VAR _drink = SUMMARIZE ( FILTER ( 'Table1', [Type] = "Drink" ), [Type], [Option], [Amount] ) VAR _Bread = SUMMARIZE ( FILTER ( 'Table2', [Type] = "Bread" ), [Type], [Option], [Amount] ) VAR _Cheese = SUMMARIZE ( FILTER ( 'Table3', [Type] = "Cheese" ), [Type], [Option], [Amount] ) RETURN UNION ( _Bread, _Cheese, _drink )The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandakSuper User
Anonymous , You can create a new table with slicer values.
But with two Table Type , and Option.
Join these two tables with table 1,2,3 and then in the visual use Type from Type and Option from Option
And this measure
measure = sum(Table1[Amount]) + sum(Table2[Amount]) + sum(Table3[Amount])
- v-yalanwu-msftCommunity Support
Hi Anonymous ,
It's not clear to me, I think you could append three tables and then use Slicer, or create new table to union them, as follows:
a)append three table and Select the three types.
b) Or create new table
new table = VAR _drink = SUMMARIZE ( FILTER ( 'Table1', [Type] = "Drink" ), [Type], [Option], [Amount] ) VAR _Bread = SUMMARIZE ( FILTER ( 'Table2', [Type] = "Bread" ), [Type], [Option], [Amount] ) VAR _Cheese = SUMMARIZE ( FILTER ( 'Table3', [Type] = "Cheese" ), [Type], [Option], [Amount] ) RETURN UNION ( _Bread, _Cheese, _drink )The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.