Really great channel! Have learned a lot through watching these, though I do have a question. I was able to use this video to get my model to work successfully, with one exception. Because the solution is essentially something like (Other Products = Total - Named Products), it doesn't work for any calculated Measures that are more than a simple Sum. For example, my model has Measures calculating percentages and a cost per unit, and they return results that don't make sense in the Others row, since the calculation should actually be figured by dividing other numbers in the Others row as opposed to doing math within the column. Any help pointing me in the right direction would be appreciated.
@igorpoleshchuk7353 жыл бұрын
Also, in the case of transactions, the total doesn't equal the sum of the rows. You can see it on 21:20. You have a total of 2184, but when we sum up the values we get 2008+60+41+46 = 2155.
@SQLBI3 жыл бұрын
You are right. There is a know bug, MS is already working on a solution. Hard to generate the conditions to hit it... but it happened with this code. I did not notice it ended up in the video. Thanks.
@igorpoleshchuk7353 жыл бұрын
Do you think it’s a bug? I think the reason is you calculate Others as All - Top3. But Top3 in case of # Trans measure is different from those of the Sales Amt measure. You can see it at 11:34 for example. You take TopN based on SELECTEDMEASURE which is # Trans but you show Top 3 by the Ranking measure which is based on the Sales Amt.
@SQLBI3 жыл бұрын
@@igorpoleshchuk735 :) You are right again. There is actually a bug, which happens in a very similar situation and that produces a very similar result, but it is not its fault here. Since I used the Ranking measure, the ranking was still being computed on the sales amount measure. The problem disappeared when everything was inside the calculation group. I had to view the video again, I did not remember all the steps.
@datafoe6263 жыл бұрын
Absolutely the best! Thank you!!!
@JosefVyborny-u2b Жыл бұрын
Hey, could you help me to adjust/write down DAX code for case where Others are already in data source, ideally I want to have Others from the source combined with Others created as result of the dynamic TopN filter. Target visual will be pie chart.
@elecirlisboa91553 жыл бұрын
Excelente aula, parabéns!!
@Milhouse77BS3 жыл бұрын
I really need to learn calculation groups! And like pragmatic decision at 38:30 to "I'm not gonna repeat code a third time"
@ArmanAper7 Жыл бұрын
Thanks a lot for your videos. It's really useful. Please, can you elaborate the non-additive edition. My problem is that I am ranking my products in higher granularity - I have products, but want to rank by products group. As far as I repeat all the steps my other row ramins blank. Cant understand the reason. Please, support.
@SQLBI Жыл бұрын
See this: www.daxpatterns.com/ranking/
@ArmanAper7 Жыл бұрын
@@SQLBI thanks a lot. I managed to work it round. I have also noticed that as we apply calculation group concept to the overal calculation it stops crossfiltering other matrix within a dashboard. Is there a way to make the matrix filter other matrix?
@igorpoleshchuk7353 жыл бұрын
Hi Alberto! Why couldn't we use the code of the Visible row measure directly in the Sales Amt measure in your initial solution without calculation groups? I mean, blank out the rows with the rank > 4.
@SQLBI3 жыл бұрын
You are right. It just did not come to my mind while recording.
@utubayisi3 жыл бұрын
Thank you so much!!!!!
@dariuszspiewak56243 жыл бұрын
Hi there. Alberto, it would have been better if you had written: if( isselectedmeasure( [ranking] ), [ranking], ) instead of the other way round. I hope you'll agree that the above is how it should have been :) The reasons are pretty obvious when you compare it with if( NOT isselectedmeasure( [ranking] ), , [ranking] ) This version is much harder to read and even harder when you realize how long the code in the is. But anyway... many thanks, as always, for sharing your insights.
@sohailansari93373 жыл бұрын
Nice video👏, can you please share the pbix file download?.. Thanks
@SQLBI3 жыл бұрын
It's here: www.sqlbi.com/tv/implementing-the-top-n-and-others-pattern-using-calculation-groups-in-dax-unplugged-28/ We've also added the link in the video description.
@sohailansari93373 жыл бұрын
@@SQLBI thanks
@abdulqadeerkamangar62793 жыл бұрын
Hi There, hope you're doing well and safe... How can use TopN 5 products and select top 5 countries from different columns while creating stacked bar chart...
@ashishmohan47073 жыл бұрын
Amazing alberto You are amazing great explanation Thanks to share with us amazing tricks But i have one question alberto can you help me I have duplicate data and i want to calculate rank like below 300---1 300--2 301---3 Please give me this dAX
@Fernando_Calero3 жыл бұрын
In that case you just show the top 4 instead of top 3, and you can change the title to just Top Measure (e.g. Sales).