TopN CONFUSION in Power BI | When the Top3 DOESN'T return 3 items

Ғылым және технология

TOPN can be very confusing as it can be interpreted in many different ways. In this video I walk you through some practical TOPN scenarios. Enjoy the video and subscribe for more Power BI hacks!
Download file here datatraining.io/powerbi-how-to
--------------------------------
📊 TRAININGS 📊
---------------------------------
Power BI Design 4 Weeks Transformation Program my.datatraining.io/pages/powe...
Power BI Essentials datatraining.io/powerbilearni...
Business User Training datatraining.io/powerbi-busin...
For Custom Trainings and Consulting email directly support@datatraining.io
---------------------------------
⏱️ TIMESTAMPS ⏱️
---------------------------------
0:00 Intro
0:40 When a top 3 filter returns more than 3 items
1:26 Rank all items with the TOPN values
05:21 Filter all items with the TOPN values
06:19 Setting the TOPN value using what if parameters and slicers
08:11 TOPN by category or overall?
11:41 TOPN %
16:39 End
---------------------------------
😍 JOIN 😍
----------------------------------
Join bit.ly/4b453bi
Subscribe bit.ly/31MnQGO​
Insta / howtopowerbi
LinkedIn / basdohmen
TikTok / how.to.power.bi
X / howtopowerbi
fb / howtopowerbi
Threads www.threads.net/@howtopowerbi
Newsletter datatraining.io/newsletter
---------------------------------
👇 CHECK THIS OUT! 👇
---------------------------------
💻 My gear amzn.to/47F21Yc
📚 Power BI books MUST READ! amzn.to/3tUfFcj
💡 General books I recommend amzn.to/48YNo33
🎶 Music for my videos www.epidemicsound.com/referra...
🚀 For growing on KZread: www.tubebuddy.com/bas
🏄 Stuff I use daily amzn.to/3HqfMQ2
* Above are affiliate links, which means at no additional cost to you, if you make a purchase using these links we will receive a small commission. It supports us and helps us to continue making more How to Power BI videos!
Thanks for being a part of this channel and all your support! 💪 🙏
#HowToPowerBI​ #PowerBI​ #DataTraining​
#powerbidesktop​ #powerbitraining​ #powerbideveloper​ #DAX

Пікірлер: 75

  • @rantaleksi7086
    @rantaleksi70862 жыл бұрын

    You are by far the best Power BI teacher I've found on KZread. Your examples are well thought, and I like it that you walk through the mistakes that anyone would likely face when building measures or visuals. Keep it up :)

  • @bimalpatel7758

    @bimalpatel7758

    Жыл бұрын

    Then you not seen video of excelisfun guys

  • @1thiagocruz

    @1thiagocruz

    4 ай бұрын

    Totaly agree.

  • @williamarthur4801
    @williamarthur4801 Жыл бұрын

    Great video on my bugbear function, also thanks for reminding us all about wrapping the Sum in calculate if not using a measure, it's one of those really important things and could have a video in it's own right as to when and when not necessary.

  • @uberleetmike
    @uberleetmike2 ай бұрын

    I am subscribing to your page after this example. Exactly what I was looking for including the "ALLSELECTED" based on multiple key fields. Thank you!

  • @joaquimcosta952
    @joaquimcosta9522 жыл бұрын

    I discovered this channel only now. Very useful. Thanks for your work.

  • @Luc-tk5oy
    @Luc-tk5oy2 жыл бұрын

    Out of all KZreadrs on PowerBI, I love your explanations most! Question, if you wanted to select the top 2, but exclude 1 specific employee (for example, exclude Sally Grant; 12k), how would that be done? In my case, I have a 'other' category, which I never want to have shown.

  • @sanks4u
    @sanks4u2 жыл бұрын

    Nicely explained, now no confusion. I like all your videos. Those are very helpful!!! Thanks!!!

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    thank you for watching Sanket!!! 🙂

  • @adityaagrawal9736
    @adityaagrawal9736 Жыл бұрын

    You are always my savior. I always find solution for my PowerBi problems.

  • @madiakns
    @madiakns2 жыл бұрын

    TopN confusion is "Ranked" high in my all dax confusions. 😊

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Haha 😄 i guess you are not the only one 😉

  • @vini_sepol
    @vini_sepol Жыл бұрын

    You helped me a lot! Thank you so much for this amazing content!

  • @virajphadnis
    @virajphadnis2 жыл бұрын

    One more clear and useful video, I make it a point to use most of these whenever required, really helpful for many of us. Thanks

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Great to hear! thx Viraj!!! 😀

  • @danielsiffredi8403
    @danielsiffredi84032 жыл бұрын

    That was art! this open my mind to do some very cool things on my reports. thanks!

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Awesome 👊 ! Haha art 🎨 , too much credit 🤣 .. thx Daniel!!!

  • @YourFavoriteYoutuberVivaan
    @YourFavoriteYoutuberVivaan Жыл бұрын

    Your ideas and way of explaining are awesome! Instead of using parameter for top 10 filtering , whether adding slicer with column ( employee ranked based on salary) would also work? The slicer can filtered for 10 values.

  • @trinhtruong4392
    @trinhtruong43922 жыл бұрын

    so touching for an excellent video

  • @ccm284
    @ccm2842 ай бұрын

    you solved my problem in 9 seconds.

  • @matthiask4602
    @matthiask46022 жыл бұрын

    very helpful, thx!

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Glad to hear that! thx Matthias! 😀

  • @isjajo
    @isjajo2 жыл бұрын

    This was very helpful, thx

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    😀 thanks for watching Jacob

  • @pankajpatle5970
    @pankajpatle59702 жыл бұрын

    Hey Bas, Your videos are really helping me in my work. I have to project Bottom 10 or 20 in my project but it should exclude zero values. How can it be done? Your help would be really appreciated.

  • @Crysteps
    @Crysteps2 жыл бұрын

    Hey Bas, Thank You for your videos. I'm a new subscriber and am really enjoying the way you teach DAX. Any thoughts on the New "Upgraded" DAX Intellisense that came out with the latest PBI Update ? ;)

  • @mehdihammadi6145
    @mehdihammadi61452 жыл бұрын

    Thanks for sharing

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    thx for watching Mehdi 😀

  • @ashishmohan4707
    @ashishmohan47072 жыл бұрын

    Wow again with new amazing video bas

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Thx so much Ashish 😀

  • @gulmohar5441
    @gulmohar54412 жыл бұрын

    Thank you for the video, great content. Could you also please do a video on showing a random set of rows from a table? Like if I have 1000 records for the given context and I need to see 10 random rows, not based on any ranking, so that the next time I need to see 10 rows, they'll be different from the ones I saw earlier.

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    thanks for the Idea Gulmohar! sounds interesting, what is the practical application you need it for?

  • @emilyamalkin4367
    @emilyamalkin4367 Жыл бұрын

    You are an amazing teacher!

  • @DilbagSingh-vf6gv
    @DilbagSingh-vf6gv2 ай бұрын

    hey, in explained scenario in the video, isn't 'IF' function working in reverse, as 'IF' condition is if employee rank is >= 20 then return 1 and in filter we add "is =1" which then filters ranking >= 20 and return all the values.

  • @TechTeacherTT
    @TechTeacherTT2 жыл бұрын

    This is very useful for me and lots of other people!!

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    So nice to hear, thx for watching 😊

  • @TechTeacherTT

    @TechTeacherTT

    2 жыл бұрын

    @@HowtoPowerBI no worries. I think the topN funcfion can indeed be very confusing especially when thinking about rank . That's why I wanted to dedicate a video to it as well. In th

  • @rvheadhunter

    @rvheadhunter

    Жыл бұрын

    @@HowtoPowerBI please help, how to count % of running total - total qty..

  • @RakeshKumar-gr1yg
    @RakeshKumar-gr1yg2 жыл бұрын

    Awesome videos, great content everytime, kudos to that!!!! Although I have a question, what if we want to see the rank of a department also in the same visual? could you please throw some light on that.

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    will do, that topic deserves a video on its own

  • @syedmaazsaif
    @syedmaazsaif2 жыл бұрын

    Is there a way to have top n filter to ingore a product and move to next one. Like if i want to not include product 3 but instead want 4 then 5 etc . Is this possible

  • @VinyuS
    @VinyuS Жыл бұрын

    I have a similar issue but in my case i really have to calculate with only 10 in case of TOP10, if i take your example how could you calculate the average salary of the 10 best payed employee?

  • @arinbose5778
    @arinbose57782 жыл бұрын

    Sir i cant find the filter type option in my sliced chart or other visual reports. Please help

  • @oleg.ostrokomorets
    @oleg.ostrokomorets2 жыл бұрын

    Это прекрасно!

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Спасибо :)

  • @sands7779
    @sands77792 жыл бұрын

    so clear

  • @DilbagSingh-vf6gv
    @DilbagSingh-vf6gv2 ай бұрын

    In my case, i need Top 20 and Bottom 20 customers based on their NetSales when i select slicer "Top 20 Customers" and Bottom 20 Customers" respectively. can this be achived with explained approach in the video? please share your insight why Below measure is not working CustomerTopNfilter = VAR x = IF ( [CustomerRanking] [Measure which returns x value when Bottom 20 Customer slicer is seleceted],0 ) ) return x

  • @shanzeafreen8335
    @shanzeafreen8335 Жыл бұрын

    Will this approach work if my measure (total salary in your example) is a product function of two column from different tables. Confused what table should I refer while writing rankx. #howtopowerbi

  • @boozer69n
    @boozer69n5 ай бұрын

    good video but unless im missing something there was nothing to limit the TopN to the NUMBER of records I wasn't to display which was the primary reason for coming here as the title suggests...

  • @DilbagSingh-vf6gv

    @DilbagSingh-vf6gv

    2 ай бұрын

    hey, in explained scenario in the video, isn't If function working in reverse, as 'IF' condition is if employee rank is >= 20 then return 1 and in filter we add "is =1" which then filters ranking >= 20 and return all the values.

  • @navneettaneja3198
    @navneettaneja31982 жыл бұрын

    on distinct value can we use

  • @529deepaks
    @529deepaks Жыл бұрын

    Hi Bas, Thank you for amazing videos. I need one urgent help. I want 3 card visuals in my report. First will show highest selling brand along with sales amount, second will give second highest selling Brand along with sales amount and similarly for third. I tried a lot but no luck. Can you pls guide me here with measure or anything. Thank you!

  • @rvheadhunter
    @rvheadhunter Жыл бұрын

    Bas, how to count RT % of sales - total qty

  • @enricomeggio84
    @enricomeggio84Ай бұрын

    Can anyone explain me how to obtain the right total of the topn rows?

  • @rajm5349
    @rajm53492 жыл бұрын

    useful video thnks fr that, bt i did not understand % concept

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    thx Raj! Let me clarify TopN% -> If you want to return those employees that earn more than the median salary - that would be top 50% .. in the video I make that a bit more flexible and you could also choose any % , for example top10% employees based on salary

  • @joserobertodantas1516
    @joserobertodantas151610 ай бұрын

    Nice video... Btw, I was expecting a solution so the Top3 would return 3 items =/

  • @hainsay
    @hainsay2 жыл бұрын

    In the same vein of difficulty selecting things, if I have a measure that is limited by a date range, and I want to show all the dates in the range even if the measure has a value of zero, how do I go about that? All my attempts end up with "all dates" in my date table

  • @hainsay

    @hainsay

    2 жыл бұрын

    Found a solution but I don't like it too much measurename = vars and stuff var firstdate = var lastdate = return measure calculation + if (min(calendar date) = firstdate, 0, BLANK() )

  • @500iq6foot8
    @500iq6foot82 жыл бұрын

    Anyway to get a chart to auto drill down when only one item is left in the filter?

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    I don't think that's possible 🙄

  • @rvheadhunter

    @rvheadhunter

    Жыл бұрын

    @@HowtoPowerBI please help, how to count % of running total - total qty

  • @harishstark
    @harishstark2 жыл бұрын

    Scheduled refresh is slow when compare to manual refresh You guys know anyother way to do automatically using other apps Like power shell or python

  • @anoopdube9581
    @anoopdube958111 ай бұрын

    RANKX function is not throwing expected outcome. Happy to share my code if you like. Any help will be highly appreciable.

  • @DilbagSingh-vf6gv

    @DilbagSingh-vf6gv

    2 ай бұрын

    hello

  • @RobertoStaltari
    @RobertoStaltari2 жыл бұрын

    You've used both ALLSELECTED and REMOVEFILTERS. Are they interchangeable?

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Hi Roberto, thx for watching! They are not the same -> When used inside of the calculate function both ALL and REMOVEFILTERS are the same. ALLSELECTED would remove the filters from the visual, but not outside filters (from a slicer, filter panel or other visual). In the rankx function I use the all function to return all the rows in a table, or all the values in a column, ignoring filters, and allselected if you want to keep filters from outside the visual. The rankx function then iterates over that table. REMOVEFILTERS can only be used to clear filters but not to return a table like all and allselected, so therefore wouldnt be an option here.

  • @rvheadhunter

    @rvheadhunter

    Жыл бұрын

    @@HowtoPowerBI please help, how to count % of Running total of sales - total qty ??

  • @stephanemesnildrey105
    @stephanemesnildrey10510 ай бұрын

    Hello Top👍 de "France"

  • @frankgovers8420
    @frankgovers84202 жыл бұрын

    Bas, great!! Cudo's

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    thank you Frank 😊

  • @sonalisahu806
    @sonalisahu8062 жыл бұрын

    First like 👍

  • @HowtoPowerBI

    @HowtoPowerBI

    2 жыл бұрын

    Yey 😁🥳

  • @sonalisahu806

    @sonalisahu806

    2 жыл бұрын

    @@HowtoPowerBI Thanks for sharing this video 👌 It will resolve all the issues faced in TOPN 🙂

  • @schajuli1991
    @schajuli1991 Жыл бұрын

    RankByAmountFails = RANKX(ALLSELECTED(DimCustomer),SUM(DimCustomer[Amount])) What is wrong with this one? It is still giving me always 1 for ranking although the amounts are different. E.g. the following is working as supposed ... RankyByBirthdayWorking = RANKX(ALLSELECTED(DimCustomer),FIRSTDATE(DimCustomer[BirthDate])) Edit: Ok, I see using Calculate or using a Mesure for Sum is the way to go again here .... Edit2: Ok, I should first watch videos till the end :D

Келесі