Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Guys!
I do haven issue, I've been told to make a column based on another column call month_id.
Basically it's the combine of year and month.
And I need to make a table like this one below. Adding a column per mes_id.
Segment | 202001 | 202002 |
S1 | .00001 | .2300 |
S2 | .002341 | .009134 |
I tried by pivot but not sure yet how it works.
Does anybody have an idea how can I reach this result?
Thanks for the help!
Solved! Go to Solution.
You can by using the Pivot Column feature in the Transpose tab of Power Query but I recommend against it. It will make your life miserable when trying to create visuals and measures in DAX. Plus, if you have thousands or millions of rows, it won't pivot. It will just throw an error.
Pull your data in as is. Then add a Matrix visual, and add the mes_id column to the Columns setting, Segments to the rows, and your data to the values. It will just work.
If that doesn't help, please share a PBIX file with some sample data so we can see the entire picture. Your sample image for example doesn't have the data you want in your expected result, so it is kinda hard to ensure a proposed solution will work.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingYou can by using the Pivot Column feature in the Transpose tab of Power Query but I recommend against it. It will make your life miserable when trying to create visuals and measures in DAX. Plus, if you have thousands or millions of rows, it won't pivot. It will just throw an error.
Pull your data in as is. Then add a Matrix visual, and add the mes_id column to the Columns setting, Segments to the rows, and your data to the values. It will just work.
If that doesn't help, please share a PBIX file with some sample data so we can see the entire picture. Your sample image for example doesn't have the data you want in your expected result, so it is kinda hard to ensure a proposed solution will work.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingI tryied the matrix thing an it works perfectly.
I was sure that the solution was easy but didn't know how to do it.
Thank you for the help!
Grettings
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting