Forum Discussion
Top 10 on values
Thanks,
this works, but I'm having trouble sorting.
I have a measure now
Količina =
var _max = MAXX(ALLSELECTED('nov_27'), nov_27[datum_posnetka])
return
CALCULATE (
SUM (nov_27[izdkol] ),
FILTER ( ALL ( nov_27), nov_27[datum_posnetka] = _max),
VALUES(nov_27[kupec]), VALUES(nov_27[progenot]))
and the measure of sorting
Top 10 po kolicini = RANKX(ALL(nov_27[kupec]), [Količina],,DESC)
the table I show can be sorted both under LU_PCP and LU_FT, and within that then the quantities are fitted. I can't show the Top 10 columns
new version powerBI
https://drive.google.com/file/d/1IZGEzxdqw84VZ4dCymFQdE_oi0XX-otv/view?usp=sharing
thx
- LeaRupnik4 years ago
Helper III
i don't want without a top 10 column
- SpartaBI4 years ago
Community Champion
LeaRupnik try this:
Only write this measure:Količina = VAR _max = MAXX(ALLSELECTED('nov_27'), nov_27[datum_posnetka]) VAR _result = CALCULATE ( SUM (nov_27[izdkol] ), nov_27[datum_posnetka] = _max ) VAR _rank = RANKX( ALLSELECTED(nov_27[kupec]), CALCULATE ( SUM (nov_27[izdkol] ), nov_27[datum_posnetka] = _max ) ,_result ,DESC ) RETURN IF( _rank <= 10, _result, BLANK() )No need for the visual level filter:
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.Showcase Report – Contoso By SpartaBI
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
SpartaBI Logo