Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
fav_ccc2021
Helper I
Helper I

Invertir numero con DAX

Hola a todos

 

me pueden ayudar a invertir un numero con dax?

Ejemplo:

 

15254956  ---->  65945251

 

Desde ya muchas gracias por la ayuda!!!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

lbendlin_0-1706651387945.png

Column2 = 
var a = Format([Column1],"#")
var b = SELECTCOLUMNS(GENERATESERIES(1,len(a)),"Index",[Value])
var c = GENERATE(b,{mid(a,[Index],1)})
return CONCATENATEX(c,[Value],"",[Index],DESC)

NOTE: This will fail (sort of)  if the last digit of the number is 0.

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

lbendlin_0-1706651387945.png

Column2 = 
var a = Format([Column1],"#")
var b = SELECTCOLUMNS(GENERATESERIES(1,len(a)),"Index",[Value])
var c = GENERATE(b,{mid(a,[Index],1)})
return CONCATENATEX(c,[Value],"",[Index],DESC)

NOTE: This will fail (sort of)  if the last digit of the number is 0.

 

for the record here is a more concise version

 

= CONCATENATEX(ADDCOLUMNS(GENERATESERIES(1, LEN([Number])), "Rev", MID([Number],[Value],1)), [Rev], "",[Value],DESC)

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.