Forum Discussion
Mapping suppliers with different categories
- 7 years ago
I would proberbly make a calculated column in the dataset defining if the row is related to a company supplying both honey and milk.
Company Produce Category Company 1 Honey Milk/Honey Company 1 Milk Milk/Honey Company 2 Honey N/A Company 2 Wheat N/A Company 3 Honey Milk/Honey Company 3 Milk Milk/Honey Company 4 Bread N/A
The calculated column would proberbly look somehting like this:Column = VAR Company = *Table'[Company] Return IF( AND( CALCULATE( COUNTROWS( 'Table' ), ALL('Table'), 'Table'[Company] = Company, 'Table'[Produce] = "Honey" ) > 0 , CALCULATE( COUNTROWS( 'Table' ), ALL('Table'), 'Table'[Company] = Company, 'Table'[Produce] = "Milk" ) > 0 ), "Milk/Honey", "N/A" )
What exactly do you mean by map here? Could you show the desired outcome somehow?
I want to create a map where I only show a marker where a company deliveres both Milk and Honey (in the attached case the yellow). My problem is that a record occurs twice (two separate rows in excel) for for the yello company, once for Milk and once for Honey. In the attached example it shows all companies delivering either milk or honey
- tex6287 years ago
Community Champion
I would proberbly make a calculated column in the dataset defining if the row is related to a company supplying both honey and milk.
Company Produce Category Company 1 Honey Milk/Honey Company 1 Milk Milk/Honey Company 2 Honey N/A Company 2 Wheat N/A Company 3 Honey Milk/Honey Company 3 Milk Milk/Honey Company 4 Bread N/A
The calculated column would proberbly look somehting like this:Column = VAR Company = *Table'[Company] Return IF( AND( CALCULATE( COUNTROWS( 'Table' ), ALL('Table'), 'Table'[Company] = Company, 'Table'[Produce] = "Honey" ) > 0 , CALCULATE( COUNTROWS( 'Table' ), ALL('Table'), 'Table'[Company] = Company, 'Table'[Produce] = "Milk" ) > 0 ), "Milk/Honey", "N/A" )- MaccoP7 years agoRegular Visitor
tex628 wrote:I would proberbly make a calculated column in the dataset defining if the row is related to a company supplying both honey and milk.
Company Produce Category Company 1 Honey Milk/Honey Company 1 Milk Milk/Honey Company 2 Honey N/A Company 2 Wheat N/A Company 3 Honey Milk/Honey Company 3 Milk Milk/Honey Company 4 Bread N/A
The calculated column would proberbly look somehting like this:Column = VAR Company = *Table'[Company] Return IF( AND( CALCULATE( COUNTROWS( 'Table' ), ALL('Table'), 'Table'[Company] = Company, 'Table'[Produce] = "Honey" ) > 0 , CALCULATE( COUNTROWS( 'Table' ), ALL('Table'), 'Table'[Company] = Company, 'Table'[Produce] = "Milk" ) > 0 ), "Milk/Honey", "N/A" )Great! Thank you :)