Forum Discussion
How to setup multiple columns for visualization
- Anonymous8 years ago
Hi all,
I inspired myself from another post and found my solution :)
Manufacturer = DISTINCT ( UNION ( SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #1]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #2]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #3]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #4]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #5]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #6]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #7]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #8]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #9]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #10]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #11]) ) )
Hi Anonymous,
Please illustrate your scenario with sample data and image of desired output to help us better understand.
How to Get Your Question Answered Quickly
Regards,
Yuliana Gu
- Anonymous8 years agoNot applicable
Hello,
Below is an example of what my table would look like (with a lot more information in the middle). Important to note here that there are no duplicates in the STOCK NUMBER column as it is used on a 1 to many relationship
STOCK NUMBER Manufacturer 1 Manufacturer 2 Manufacturer 3 Manufacturer 4 700000007 Volvo BMW 700000010 Ford Toyota Volvo 700000230 VW Alpha Romeo Honda BMW 700000440 Honda Toyota Lexus Volvo 700000560 Hyundai Below is an example of what visual I am trying to achieve
Effectively list all the manufacturers (without duplicates) across all tables with a count of stock numbers they are listed against.
Does anyone have a clever suggestion?
- Anonymous8 years agoNot applicable
Hi all,
I inspired myself from another post and found my solution :)
Manufacturer = DISTINCT ( UNION ( SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #1]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #2]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #3]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #4]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #5]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #6]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #7]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #8]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #9]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #10]), SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #11]) ) )- thinkerbee57 years agoRegular Visitor
Hello! I am trying to do something very similar but am having trouble applying your solution. can you please tell me what the "Manufacturer" piece refers to in your example?
The error I'm getting states: "a table of multiple values was supplied where a single value was expected"
Manufacturer =
DISTINCT (
UNION (
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #1]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #2]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #3]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #4]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #5]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #6]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #7]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #8]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #9]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #10]),
SELECTCOLUMNS('Current Inventory',"Manufacturer",'Current Inventory'[Manufacturer #11])
)
)