Forum Discussion
Dynamic dashboard , performance measuring parameter
Hi,
Thanks for the answer, almost there!
PercentMeasure = COUNTAX(FILTER(Table, Table[Column] < 1), Table[Column]) / COUNTA(Table[Column])
The problem is that your code returnes value 1.
I guess that DAX is filtering the table, counting the number of rows and then dividing it with the number of rows of filtered table (same number of rows).
Any info on this? I managed to find "quick and dirty" solution - introducing 3 measures -
Measure 1 = total number of rows
measurure 2 = number of rows that are less than 1
measure 3 = measure 2/measure 1
it works, but it is not the most estetic solution :D
That exact measure works with my data. Exact same setup, just a different condition for the numerator. It even changes as I slice different categories of the data. The [Column] < 1 condition is only applied to the one operation, not the rest of the expression. Are you sure that you don't have a page level filter or something that removes all values that are less than 1? If you were able to create a smaller, redacted set of data that demonstrates the issue, and share that .pbix file, I can do more specific troubleshooting.
Ways to really force this depends on your situtaion. Do you want the denominator of your % to always be the count of ALL rows in your data? If so, you can use something like:
PercentMeasure = COUNTROWS(FILTER('Table', 'Table'[Column] < 1)) / COUNTROWS(ALL('Table'))This works, but then will do things if you filter the table later by another dimension (say by request type) it will still only return the values given over the entire table, leading to very low percentages, but working as you intend.