Forum Discussion

Excellove15's avatar
Excellove15
Iron Contributor
May 09, 2025
Solved

Visual and dax level optimization that causes report slowdown

Hi, I have this visual as attached, that has lot of visual level filters applied it has a dax measure called data completeness as below   Data Completeness = var _total = COUNT('Calendar'[Date])...
  • SergeiBaklan's avatar
    SergeiBaklan
    May 14, 2025

    Since in matrix you use months only as periods, changed  grouping a bit. To the Data table column is added

    Month = RELATED( 'Calendar'[Month] )

    and new measures are

    Count of Exisitng Days by Month = VAR bydates =
        SUMMARIZECOLUMNS (
            Data[Month],
            "count",
                COUNTROWS (
                    DISTINCT ( SELECTCOLUMNS ( Data, Data[Date], Data[DBName-Point_Id] ) )
                )
        )
    RETURN
        SUMX ( bydates, [count] )
    
    ///
    Data Completeness by Month = DIVIDE ( [Count of Exisitng Days by Month], [Count of Possible Days] )

    With them matrix calculation is

    compare to

    Not a lot but at least something. Matrix is on "Page 1" at PR-419 - Data Coverage - 03.pbix

Resources