Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I can't figure out how to re arrange the columns... conditional column won't work with direct query...
I need Pre before Post and the name has to remain the same. I thought about adding a prefix but not an option..
Apprecite any direction
Live | Post | Pre | |
1 | |||
2 | |||
3 |
Solved! Go to Solution.
Hi @NOVICE02 ,
Because you are using DirectQuery Mode, so we think adding custom column will not work ( it is still an awesome solution in Import Mode, thanks @Anonymous ). We can create a calculated table using DATATALE function and make the type column sort by another value, then use the type in the new table as the column field to meet your requirement.
Table =
DATATABLE (
"Type", STRING,
"Sort", INTEGER,
{
{ "Live", 1 },
{ "Pre", 2 },
{ "Post", 3 }
}
)
Best regards,
Have you tried re-arranging the order of the columns within the Matrix visualization properties?
@Anonymous good point but that is only possible if you write 3 different measure and each measure is filtering each specific value
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@NOVICE02 at the backend, you should have sort column and then in modelling tab you sort your column (Pre Post Live) with this sort order column and that will do it.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
So Pre Post Live are not columns but values of variabe "Type" which is then put into the column field of the matrix
Hi @NOVICE02 ,
Because you are using DirectQuery Mode, so we think adding custom column will not work ( it is still an awesome solution in Import Mode, thanks @Anonymous ). We can create a calculated table using DATATALE function and make the type column sort by another value, then use the type in the new table as the column field to meet your requirement.
Table =
DATATABLE (
"Type", STRING,
"Sort", INTEGER,
{
{ "Live", 1 },
{ "Pre", 2 },
{ "Post", 3 }
}
)
Best regards,
It worked! amazing, thank you so much. Apologies for the delay, was away.
thanks again,
@NOVICE02 , @parry2k I see the "miss" on my end with what you're asking for. With that said, @parry2k is correct with his suggestion. If you don't already have a number column to sort on, create a column that stores a number based on the value of the [Type] field. (i.e. if [Type] = "Pre" then 1 else if [Type] = "Post" then 2 else if [Type] = "Live" then 3). Then sort the [Type] column based on this number column just created. The sorting would be done within the Data pane view.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |