Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All,
A column in power bi report contained two datatypes data (Number & Text)
Test:
1 , 22, 2,178, 3, Red, 10, 20, 30, Yellow, 100, 110, 200, 250, Green
If I convert number (Decimal or Whole) data type 'Red, Yellow, Green' will be gone (or) get error. So I changed text datatype
in text datatype If I sort Test column, it was coming order like
1
10
100
110
178
2
20
22
200
250
3
30
Green
Red
Yellow
(or reversed of this order)
it was ordering based on letter.
But I need order based on value ( Like 1,2,3,10,20,22,30,100,...Green, Red, Yellow)
By
Gnanasekar
Solved! Go to Solution.
Hi @Gnanasekar,
Taking into account that you need the values by order you can always add a column with the following formula:
Sort_Order =
IF (
NOT ( ISERROR ( 'Table'[Column] + 0 ) )
= TRUE ();
CONCATENATE ( REPT ( 0; 4 - LEN ( 'Table'[Column] ) ); 'Table'[Column] );
'Table'[Column]
)Then use this column to sort out the visual.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Gnanasekar,
Taking into account that you need the values by order you can always add a column with the following formula:
Sort_Order =
IF (
NOT ( ISERROR ( 'Table'[Column] + 0 ) )
= TRUE ();
CONCATENATE ( REPT ( 0; 4 - LEN ( 'Table'[Column] ) ); 'Table'[Column] );
'Table'[Column]
)Then use this column to sort out the visual.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHello, what if I have both negative and positive value? How can I use this method properly?
I think you need to add a column and just write like this:
Sort_Order = VALUE([Data])
@MFelix An argument of function 'REPT' has the wrong data type or has an invalid value.
Hi @Digger,
Can you share the formula you are using?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Digger what type of data you have on this column? Can you share some sample data
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsWhat is the text you want to combine can you give a sample?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsVote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |