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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sergiotorres1
Regular Visitor

REGRESION LINEAR ACOTADA

Hola buenos dias,

Estoy haciendo una regresión linear con la formula que dejo acontinuacion. El problema es que la columna de [Week] pertenece a una tabla de dimension año tiene que ser un año completo y me calcula valores que en realidad no existen. Lo que me gustaria conseguir es filtrar esa columna de [Week] que sea menor que 60. Y de esa forma que la regresión linear se quedara solo en 60. He probado a poner filter pero no hay manera, necesito ayuda.

sergiotorres1_0-1707826958827.png

 

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Pruebe algo como esto:

LinearRegression
VAR WeeklyAnalysis =
    ADDCOLUMNS (
        ALLSELECTED ( dimCalendar[Week] ),
        "@Analysis", [ConteoCreadas_Analysis]
    )

VAR RemoveBlanks =
    FILTER ( WeeklyAnalysis, NOT ISBLANK ( [@Analysis] ) )

VAR line =
    LINESTX ( RemoveBlanks, [@Analysis], dimCalendar[Week] )

[...remainder of your measure...]

Puedes cambiar

NOT ISBLANK ( [@Analysis] )

Para

dimCalendar[Week] < 60

o cualquier otra condición de filtro que desee.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors