Forum Discussion

horaciorek's avatar
horaciorek
New Member
3 years ago
Solved

Count data based on slicer parameters

Please look at this dashboard just created to illustrate my problem: First slicer represents the number of years (times) where data exists for an indicator series. Second slicer represent the...
  • horaciorek's avatar
    3 years ago

    This measure did the trick:

    Filtered = 

    VAR FilteredData =

        FILTER(

            Data,

            Data[Year] >= [Year Value]

        )

    VAR SummaryTable =

        SUMMARIZE(

            FilteredData,

            Data[Country],

            Data[Indicator],

            Data[Series],

            "YearCount", CALCULATE(DISTINCTCOUNTNOBLANK(Data[Year]))

        )

    VAR IndicatorSeriesWithMultipleYearsCount =

        COUNTROWS( FILTER(SummaryTable, [YearCount] >= Years[Years Value]))

    RETURN

        IndicatorSeriesWithMultipleYearsCount