Hello everyone!
I have standard transactions table and a date table. Transactions table contains info on various producers and their output. I created a simple measure to calculate their average prices which i am intending to visualize using a bar chart:
Currently I have a Visual filter which shows only Selected TopN (3,5,7,10) producers in terms of output (Volumes[Volume] column). The problem is that it calculates ranks for TopN producers in each year separately. What I am trying to achieve is showing only this year (2016 atm) TopN. Here is what I have so far:
- Ranking measure: RanksForAvg = RANKX(ALL(Volumes[Producer Eng]); CALCULATE(SUM(Volumes[Volume]); FILTER(ALL(Dates[Year]); Dates[Year]=YEAR(NOW()))); ;DESC;Dense)
where Volumes[Producer Eng] is just Producer's name
2. Visual filter measure: FiltForAvg = IF([RanksForAvg]<=[Selected TopN];1;0)
Both work just fine as standalone visualizations, but when I try to add visual filter it behaves really odd, filtering nothing:
I hope PowerBI community could help me with this one. Thank you all in advance.