Forum Discussion
lushd
5 years agoFrequent Visitor
Multi variable scatter plot
Hi Community, I have a dataset of shipping voyages with columns for Date, Port, Shipping company, loading time, discharge time, etc. One useful visual is a scatterplot with loading time and dis...
- Anonymous5 years ago
Hi lushd ,
Please try the following steps:
1. Createa a new table with Legend type (Port and Company) for slicer.
2. For dynamic Y-axis:
Measure = SWITCH(MAX('ForSlicer'[Legend]), "Port",CALCULATE(MAX('Table'[discharge time]),FILTER('Table','Table'[Port]=MAX('Table'[Port]))) , "Company", CALCULATE(MAX('Table'[discharge time]),FILTER('Table','Table'[Company]=MAX('Table'[Company]))))3. Create a rank measure for conditional formatting:
For conitional formatting = SWITCH(MAX('ForSlicer'[Legend]), "Port",RANKX(ALL('Table'), CALCULATE ( MAX ( ( 'Table'[Port]) ) ),,ASC,Dense) , "Company", RANKX(ALL('Table'), CALCULATE ( MAX ( ( 'Table'[Company]) ) ),,ASC,Dense))4. Add Port and Company to tooltips field.
Or unpivot the table.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
5 years agolushd , if category and port are two different columns you can have one of them in legend or other on Details.
If you want these as legends, You need to unpivot the data
https://radacad.com/pivot-and-unpivot-with-power-bi