Forum Discussion
Count rows less than column value
- 10 years ago
You are close. Assuming you are filtering on your duration column in a visual, this should give you what you want.
=CALCULATE( COUNTROWS( Table ), FILTER( ALL(Table), Table[Duration] <= max(Table[Duration] )))
The addition of the ALL function removes all filters in your visualisation
the addition of the MAX function (or any aggregator for that matter) will detect the current filter context and pass that to your calculate formula.
Hence the filter function first removes all filters and then reapplies a filter on the Table[Duration] column to be less than or equal to he maximum value in the current filter context.
Ha ha! Just noticed your book link at the bottom. I'll check it out! :)
Will
Yep, that is what I was going to suggest. :smileyvery-happy:
- vazfelipe8 years agoFrequent Visitor
Hi,
Please, I created a measure MEDIAN (Dax 2013 version, there's no Median function). I would like to COUNT how many itens in the AVG column that are Greater than the MEDIAN measure. Any idea?
My example is here: https://1drv.ms/f/s!As8YC7wZr8RKist1_Ql70SsOKar7yA