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
dnewton
Helper II
Helper II

Eventos en curso - trabajar pero se ha vuelto muy lento

Hola a todos

Tengo una columna calculada para una aplicación de software que cuenta cuántas sesiones son "simultáneas" con otra sesión (en otras palabras, "eventos en curso"). Como se muestra a continuación:

Concurrent with this session = 
COUNTROWS (
    FILTER (
        Sessions,
        Sessions[Id] <> EARLIER(Sessions[Id])
            && NOT (Sessions[End] < EARLIER(Sessions[Start] ) || Sessions[Start] > EARLIER(Sessions[End]) )
    )
) +1

Esto ha funcionado bien durante varios meses, pero recientemente, ya que el tamaño de mi base de datos ha crecido a alrededor de 5.000 filas, ahora tarda mucho tiempo en actualizarse y está agotando el tiempo de espera en power Bi Service, lo que hace que el conjunto de datos no se actualice.

¿Hay alguna manera de "optimizar" esto para mejorar el rendimiento?

Encontré otra sugerencia en otro lugar (como a continuación) pero no he tenido suerte traduciendo esto para mis datos:

=Calculate(
CountRows(FactInternetSales),
Filter(Values(FactInternetSales[OrderDateKey]), Min(DimDate[DateKey])>=[OrderDateKey]),
Filter(Values(FactInternetSales[ShipDateKey]), Max(DimDate[DateKey])<=[ShipDateKey]))

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hola @dnewton

Si puede probar esta fórmula como se muestra a continuación:

Concurrent with this session = 
var _Id=Sessions[Id]
var _Start=Sessions[Start]
var _End=Sessions[End]
Return
COUNTROWS (
    FILTER (
        Sessions,
        Sessions[Id] <> _Id
            && NOT (Sessions[End] < _Start || Sessions[Start] > _End )
    )
) +1

O

Concurrent with this session = 
var _Id=Sessions[Id]
var _Start=Sessions[Start]
var _End=Sessions[End]
Return
COUNTROWS (
    FILTER (
        Sessions,
        Sessions[Id] <> _Id
            &&  (Sessions[End] >= _Start && Sessions[Start] <= _End )
    )
) +1

saludos

Lin

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

Esto funcionó perfectamente - gracias!

Greg_Deckler
Super User
Super User

Tal vez algo en esta serie de artículos ayudará: https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-1/ba-p/976275


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.