Forum Discussion
Distinct Count dependent on slicer
- 2 years ago
FYI, got it to work by creating a summarized table by the projects. I then adjusted my meet goal formula with :
if ( hasonevalue(table[lab], calculate( distinctcount(table[project]), filter(table, table[Expensed %] >= to ExpensedGoal))), calculate( distinctcount(table[project]), filter(calculatedtable, calculatedtable[Expensed %] >= to ExpensedGoal)))
definately not the best way to go about it, but is my work around until I get something else working.
the shorter way to answer this is to create a new calculated column (not a measure) in your table to for Expenses %
then your "Meet Goal" measure should work
the problem you are facing is related to row context operations, the way you were doing it is not allowing for the measure Expenses % to calculate row by row
If I answered your question please accept the reply as the solution 🙂
It still seems to be counting the same. I created the collumn and then changed the formula to:
Meet Goal = calculate( distinctcount(table[project]), filter(table, table[Expensed %] >= to ExpensedGoal)))
When I click the slicer for an individual lab it counts correctly, it is only when all are selected that it seems to count a project as long as the goal is met in at least one of the associated labs
- SgtMeowmers2 years agoNew Member
FYI, got it to work by creating a summarized table by the projects. I then adjusted my meet goal formula with :
if ( hasonevalue(table[lab], calculate( distinctcount(table[project]), filter(table, table[Expensed %] >= to ExpensedGoal))), calculate( distinctcount(table[project]), filter(calculatedtable, calculatedtable[Expensed %] >= to ExpensedGoal)))
definately not the best way to go about it, but is my work around until I get something else working.