Forum Discussion
Single scatter chart w/ dynamic XY axis
So does X-axis and Y-axis take the columns from two tables? Could you share more details?
Regards,
Jimmy Tao
Hey Jimmy,
Please see attached pbix
My original plan was to be able to:
- Select what Sections to compare (multi-select slicer for Section 1, Section 2 and Section 3)
- Select what metric (column) to plot on x-axis (single select slicer for thickness, mass, intrusion etc.)
- Select what metric (column) to plot on y-axis (single select slicer for thickness, mass, intrusion etc.)
So, the goal was to plot, for example - mass vs intrusion for Section 1 and Section 2
---
After spending some time trying to figure out a good approach I ended up transforming my data as follows:
- Create a new source w/ all Sections combined and respective columns aligned, and Add a column to index each unique row
- Duplicate this Table and unpivot all metric columns - Combined_unpivoted_X
- Duplicate this Table and unpivot all metric columns - Combined_unpivoted_Y
Now I'm able to dynamically choose what sections to compare (using multi-select slicer) and what Xvalue and Yvalue to plot (using the single select slicer), but when I plot Xvalue vs Yvalue the scatter chart says 'Can't determine relationship between fields'.
I have tried defining relationships, but it still won't plot Xvalue vs Yvalue, and I'm not sure why!
In the attached file - you'll see I'm able to pull all the necessary data - just not able to plot it!
I'd appreciate if you could take a quick peek at it and let me know if I'm missing something.
Thanks!!