Forum Discussion
horaciorek
3 years agoNew Member
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...
- 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
tamerj1
Community Champion
3 years agoHi horaciorek
Please try
IndicatorSeriesCount =
VAR FilteredData =
FILTER(
Data,
Data[Year] >= [Year Value]
)
VAR IndicatorSeriesCounts =
SUMMARIZE(
FilteredData,
Data[Indicator],
Data[Series],
"@YearCount", COUNTROWS(Data)
)
VAR IndicatorSeriesWithMultipleYearsCount =
COUNTROWS(
FILTER(
IndicatorSeriesCounts,
[@YearCount] >= [Years Value]
)
)
RETURN
IndicatorSeriesWithMultipleYearsCounthoraciorek
3 years agoNew Member
Thanks for your effort, but it doesn't seem to do the trick. With your measure, using the values I have in the image, it gives me 3 for both countries, when it should be 2 for Armenia...