SQLDAXExcelPython
Leaderboard
Dates and reshapingMedium20 points

Wide to long with melt

Turn products from wide to long: one row per product and measure, with columns ProductName, Measure and Value, where Measure is either UnitPrice or UnitCost. Set result to that.

Show solutionLifetime

Real Python running in your browser through Pyodide, with pandas available. Nothing you type is sent to a server unless you save a score.

Python
Loading editor…

Press Ctrl+Enter or Run to see the result here.