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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
javiermm
New Member

FORMATOS DIFERENTES MISMA COLUMNA

Buenas,

 

Tengo unas columnas que tienen diferentes formatos.

 

Necesito que salgan en €, en porcentaje y en número entero.

 

Necesito que me aparezcan así en PBI.

 

Muchas gracias por anticipado.

 

javiermm_0-1718794616346.png

 

1 ACCEPTED SOLUTION
v-jialongy-msft
Community Support
Community Support

Thank you very much for the method @lbendlin , I tried to create the data myself and implement it.

 

Hi @javiermm 

Based on your needs, I have created the following table.

vjialongymsft_0-1718851431665.png

 

Then you can use the following DAX to get the result you want:

MEASURE = 
IF (
    SELECTEDVALUE ( 'Table'[Column1] ) = "Storage per liter",
    FORMAT ( SELECTEDVALUE ( 'Table'[Column2] ), """€"" #,0.00" ),
    IF (
        SELECTEDVALUE ( 'Table'[Column1] ) = "Euros consumption",
        FORMAT (
            SELECTEDVALUE ( 'Table'[Column2] ),
            "General Number"),
            FORMAT ( SELECTEDVALUE ( 'Table'[Column2] ), "Percent" )
        )
    )

 

 

Result:

vjialongymsft_1-1718851501008.png

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-jialongy-msft
Community Support
Community Support

Thank you very much for the method @lbendlin , I tried to create the data myself and implement it.

 

Hi @javiermm 

Based on your needs, I have created the following table.

vjialongymsft_0-1718851431665.png

 

Then you can use the following DAX to get the result you want:

MEASURE = 
IF (
    SELECTEDVALUE ( 'Table'[Column1] ) = "Storage per liter",
    FORMAT ( SELECTEDVALUE ( 'Table'[Column2] ), """€"" #,0.00" ),
    IF (
        SELECTEDVALUE ( 'Table'[Column1] ) = "Euros consumption",
        FORMAT (
            SELECTEDVALUE ( 'Table'[Column2] ),
            "General Number"),
            FORMAT ( SELECTEDVALUE ( 'Table'[Column2] ), "Percent" )
        )
    )

 

 

Result:

vjialongymsft_1-1718851501008.png

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Muchas gracias.

lbendlin
Super User
Super User

You would normally use FORMAT for that.  Have you tried that?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.