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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fabiolamelo
Helper II
Helper II

Cómo separar el monto del salario del rango en la misma columna

Hola a todos,

Tengo una mesa con una serie de salarios y una amplia gama de ella. Estoy tratando de encontrar una manera de separar el monto del salario de la gama en diferentes tablas.

Esta es la mesa ahora

City IdCountry Salario y Alcance

Canberra ACT 61

Canberra ACT 56 - 66

Sydney NSW 56

Sydney NSW 51 - 61

Regional NSW 48 - 65

Regional NSW 55

Darwin NT 51

Darwin NT 46 - 57

Me gustaría que la mesa devolviera esto

Rango de salarios salariales de City IdCountry

Canberra ACT 56 - 66 61

Sydney NSW 51 - 61 56

Regional NSW 48 - 65 55

Darwin NT 46 - 57 51

¿Hay alguna manera de resolver este problema?

Muchas gracias de antemano por su apoyo

Fabiola Melo

2 REPLIES 2
ics_sys_usr
Administrator
Administrator

Hola, @fabiolamelo

Según su descripción, creé datos para reproducir su escenario. El archivo pbix se adjunta al final.

Mesa:

b1.PNG

Puede crear una tabla calculada como se muestra a continuación.

New Table = 
SUMMARIZE(
    'Table',
    'Table'[City],
    'Table'[IdCountry],
    "Range of Salary",
    CONCATENATEX(
        FILTER(
            DISTINCT('Table'[Salary and Range]),
            CONTAINSSTRINGEXACT('Table'[Salary and Range],"-")
        ),
        'Table'[Salary and Range],","
    ),
    "Salaries",
    CONCATENATEX(
        FILTER(
            DISTINCT('Table'[Salary and Range]),
            NOT(CONTAINSSTRINGEXACT('Table'[Salary and Range],"-"))
        ),
        'Table'[Salary and Range],","
    )
)

Resultado:

b2.PNG

Saludos

Allan

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

az38
Community Champion
Community Champion

Hola @fabiolamelo

crear una nueva tabla

Table 2 = 
ADDCOLUMNS(
    FILTER('Table', SEARCH("-", [Salary and Range],,0) > 0),
    "Salaries",
    CALCULATE(MAX('Table'[Salary and Range]), FILTER('Table', 'Table'[City]=EARLIER([City]) && 'Table'[IdCountry] = EARLIER([IdCountry])))
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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