I have a table with multiple company data and having company_id column in it. I want to show the slider with maximum value of selected company_id for ranking feature to the report.
I have created a measure to calculate count for the maximum value of selected company.
Max Value = CALCULATE(DISTINCTCOUNT(SOURCE_TABLE[Company_Name]),FILTER(SOURCE_TABLE,SOURCE_TABLE[Company_id]=SELECTEDVALUE(SOURCE_TABLE[Company_id])))
But when I try to use this for What-if parameter in ranking feature getting below error,
TopRank = GENERATESERIES(1,[Max Value], 1)
Error Code:
The arguments in GenerateSeries function cannot be blank.
When I use DISTINCTCOUNT function it works fine, but with filter it had an issue.
TopRank = GENERATESERIES(1,DISTINCTCOUNT(SOURCE_TABLE[Company_Name]), 1)
-- This is working fine
How can I get the value of DISTINCTCOUNT with FILTER. Any ideas will be appreciated.!