DAX Fridays!

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 99

  • @sloggiz
    @sloggiz 5 років тому +24

    Thanks a lot for a this solution! A piece of advice for everyone who watched this and wondered how to process multiple levels of the hierarchy in a single measure - just add as many rows as you need in between TRUE() and ELSE clause. E.g.:
    Remove Blanks =
    SWITCH(TRUE(),
    AND(ISINSCOPE(hier[Level 2]),ISBLANK(VALUES(hier[Level 2]))),BLANK(),
    AND(ISINSCOPE(hier[Level 3]),ISBLANK(VALUES(hier[Level 3]))),BLANK(),
    AND(ISINSCOPE(hier[Level 4]),ISBLANK(VALUES(hier[Level 4]))),BLANK(),
    1)
    A question for you, Ruth - is it possible to hide this measure from the Matrix view? It does it job pretty nicely but has no other purpose than this, so it would be cool to hide it.

    • @missalexpancakes
      @missalexpancakes 5 років тому +5

      you can add measure you need on the last step, where you put "1" - and no need to hide anything

    • @vivekkumarsingh4974
      @vivekkumarsingh4974 2 роки тому

      I guess there is no need to add multiple rows... U can add the top level from where the blank starts and it will work. This workaround worked for me... But still struggling with that column hiding issue... Since I am showing months in columns it is showing me 12 times the same values.

    • @piotrstachv
      @piotrstachv 2 роки тому +1

      thank you so much, that's the problem I was dealing with

    • @xyzphd122
      @xyzphd122 5 місяців тому

      @@vivekkumarsingh4974 not sure what you mean by adding top level where blank starts... do u mean adding into the measure like he wrote above? it didn't work for me. you have to add all levels to remove the blanks.

  • @brianestevezvalerio9322
    @brianestevezvalerio9322 3 роки тому +6

    Good solution, thank you. One doubt, and if instead of being the last level it is an intermediate one?
    For example:
    Project L1 | Project L2 | Task L3 | Task L4
    Project1 | | Task100 | Task 101
    Thank you

  • @sheilahart5989
    @sheilahart5989 5 років тому +2

    Very Helpful! I love how you broke down your thought process into easy to follow steps. Thank you!

    • @CurbalEN
      @CurbalEN  5 років тому

      That is how I do all my DAX :)
      Thanks for the feedback!
      /Ruth

  • @vincentafnan-murray4850
    @vincentafnan-murray4850 Рік тому

    Great video thanks. How would you approach this if you have data in ten year columns rather than just a single column? Would each year needs its own measure?

  • @oribimtekena-lawson7818
    @oribimtekena-lawson7818 3 місяці тому

    This is great .. If I wanted to use the hierarchy in a slicer, how do I get the blanks to not show up there?

  • @PedroCabraldaCamara
    @PedroCabraldaCamara 4 роки тому +1

    i can't believe this video is around since jan 2019....Awesome video Ruth! Thank you so much!!

  • @JayantDahiya2302
    @JayantDahiya2302 3 роки тому

    Hi, Very Useful Video, I was wondering if we have more than 4 level and every level has some blanks. Then how will we deal with the situation.

  • @StonewallSharpeson
    @StonewallSharpeson 4 роки тому +5

    Thanks for the video! I have a question, though. Is this example, you only have one level of a hierarchy with nulls. What would you do if you had a ragged hierarchy with, say, 10 levels with nulls beginning to appear at level 4? What if your rows with your "null" values actually have data associated with them?

    • @YanishSnob
      @YanishSnob 4 роки тому

      @
      StonewallSharpeson have you found a decision to this problem with ragged hierarchy?

    • @StonewallSharpeson
      @StonewallSharpeson 4 роки тому

      No, we just try to train our users around it. I have done quite a bit of research, and found no good, dynamic way to deal with a ragged hierarchy.

    • @StonewallSharpeson
      @StonewallSharpeson 3 роки тому +1

      No, we just try to train our users around it. I have done quite a bit of research, and found no good, dynamic way to deal with a ragged hierarchy.

    • @mstrixie29
      @mstrixie29 2 роки тому

      I just added the statement for each level at the top in descending order. Adds a lot of lines but works perfectly
      SWITCH(
      TRUE( ),
      AND(
      ISINSCOPE( 'dim PNL Element'[Level 3 Name] ),
      ISBLANK( VALUES( 'dim PNL Element'[Level 3 Name] ) )
      ),
      BLANK( ),
      AND(
      ISINSCOPE( 'dim PNL Element'[Level 2 Name] ),
      ISBLANK( VALUES( 'dim PNL Element'[Level 2 Name] ) )
      ),
      BLANK( ),

    • @npreetham7078
      @npreetham7078 2 роки тому +1

      Did anyone got the solution for this ? I have 10 levels of hierarchy

  • @peterscurr1089
    @peterscurr1089 4 роки тому

    Nice clear example as usual, Thanks.
    Would this condition need to be baked into every measure?
    With 2 x 9 level hierarchies and 80 measures, is that going to kill performance?
    The 3rd party Hierarchy slicer has a property to hide empty measures, Ideally this should be a model setting?

  • @vladimirstankovic831
    @vladimirstankovic831 4 роки тому

    I rarely comment anything but Ruth this is amazing! Thanks for sharing!

    • @CurbalEN
      @CurbalEN  4 роки тому

      Yey! Great that it was useful :)

  • @CherylCantara
    @CherylCantara Рік тому

    Awesome video. One question, I see it works if the lowest level is blank. My data's hierarchy has a list of category '1's. Only 1 of those categories has a sub category (level 2), but all have values in level 3. Therefore, the blanks occur on level 2. How would you handle that?

  • @geraldjuwah7079
    @geraldjuwah7079 Рік тому +1

    Niceeee, simple and straightforward...👍

  • @rachelsommers7168
    @rachelsommers7168 4 роки тому +1

    wow! your videos are amazing! What if I have multiple (like a 50 level hierarchy) that I want to program to check for blanks?

  • @abbabccbcddc
    @abbabccbcddc 2 роки тому

    thanks so much for this video! @curbal - any idea how to implement this same fix within a slicer?

  • @PeterKontogeorgis
    @PeterKontogeorgis 4 роки тому

    Brilliant as usual Ruth. I just had an exact same use case for this, and was basically able to replicate your steps 1 for 1. It worked, however I don't get the extra pluses for the Blank values, so it seems this issue was updated.

    • @CurbalEN
      @CurbalEN  4 роки тому

      Great, thanks for sharing :)

  • @oliveroshea5765
    @oliveroshea5765 Рік тому

    thanks once more Ruth! Not sure how I missed this one, but it's 10/10! I hope all is well!! Oliver

    • @CurbalEN
      @CurbalEN  Рік тому

      Great! Hope you are doing great too :)

  • @lorejaime
    @lorejaime 4 місяці тому

    hey! greetings from Colombia :D thank you so much for your help, I have been looking for a solution on how to hide empty rows and this was very helpful!!!

  • @curtisstallings6835
    @curtisstallings6835 3 роки тому

    Genius. What I wouldn't give to have stumbled upon this video 2 weeks ago.

    • @CurbalEN
      @CurbalEN  3 роки тому

      Better late than never hopefully!

  • @vipulsachan
    @vipulsachan 7 місяців тому

    Thanks a lot for the wonderful solution. Love from India.

  • @ryanhughes8089
    @ryanhughes8089 Рік тому +1

    Hi there, I don't suppose you have a solution if there are blank values in every level of your hierarchy? this works perfectly if you have only one level of blanks, but when doing a separate measure for each level the blanks all reappear...

  • @richardanthony2039
    @richardanthony2039 4 роки тому

    This is really useful but is it is possible to apply this to skip level hierarchies?

  • @itsyoko3477
    @itsyoko3477 3 роки тому

    Hi , how are you , thanks for the video , I have a question , is that applicable if the blank is in an intermediate level , I can see that level 4 in the example is the last level

  • @gmartinezm
    @gmartinezm Рік тому

    You SAVED my night!

  • @archanagaikwad1831
    @archanagaikwad1831 3 роки тому

    Hi Ruth, This is what I was looking for. Thanks for the video. But When I try to export the visual output to excel, the excel is blank and has only column titles. No data exported. Can you help me fix this?

  •  Місяць тому

    I have the problem wit h the decomposition tree, do you know, how can i remove the blanks from the decomposotion tree. I cant hide the blanks

  • @Unbox747
    @Unbox747 3 роки тому

    So many good tips in every video.

  • @kevinwhite8544
    @kevinwhite8544 4 роки тому

    Thank you, this was a big help. I had a switch() measure that had a format in it and i was having trouble figuring out why it was always non-blank... turns out it was when the format statement was used!

  • @tameshdoobay6058
    @tameshdoobay6058 5 місяців тому

    This doesn't seem to work in 2024 unfortunately.
    Can you do an updated tutorial for Dax105 and this one? (112). It seems that PowerBI recognizes Null in the powerquery editor but doesn't recognize it outside of the editor?

  • @bradj229
    @bradj229 Рік тому

    That is pretty slick. Thanks for sharing.

  • @sarveshnikas
    @sarveshnikas 10 місяців тому

    For multiple levels, you can use:
    R =
    SWITCH (
    TRUE (),
    ISINSCOPE('Table'[Level 2]) && ISBLANK(VALUES('Table'[Level 2])), BLANK(),
    ISINSCOPE('Table'[Level 3]) && ISBLANK(VALUES('Table'[Level 3])), BLANK(),
    ISINSCOPE('Table'[Level 4]) && ISBLANK(VALUES('Table'[Level 4])), BLANK(),
    "."
    )

  • @leonelalegria7787
    @leonelalegria7787 Рік тому

    Fantastic! solve my problem, once more time! Thanks! You area amazing.

  • @tushargogiya4017
    @tushargogiya4017 11 місяців тому

    Amazing content found when needed

    • @tushargogiya4017
      @tushargogiya4017 11 місяців тому

      But I'm facing one issue when I'm adding values from another table like add sales from other table which have relationship with it blank space reappearing

  • @oliverlight3479
    @oliverlight3479 4 роки тому

    Hello, how would you do this with multiple columns with blank values ?

  • @belizatube
    @belizatube 5 років тому

    Really great video - love the DAX's fridays

    • @CurbalEN
      @CurbalEN  5 років тому

      Thanks! And have a great weekend:)
      /Ruth

  • @mschmackle
    @mschmackle 2 роки тому

    Is there a download for #112? I checked the site, and it appears to be missing.

  • @arunwats
    @arunwats 4 місяці тому

    SWITCH(TRUE(),
    AND(ISINSCOPE(hier[Level 2]),ISBLANK(VALUES(hier[Level 2]))),BLANK(),
    AND(ISINSCOPE(hier[Level 3]),ISBLANK(VALUES(hier[Level 3]))),BLANK(),
    AND(ISINSCOPE(hier[Level 4]),ISBLANK(VALUES(hier[Level 4]))),BLANK(),
    1)
    This scenario is not working for me, I have a last level which is always there, how to handle this, any help would be great!

  • @mehdihammadi6145
    @mehdihammadi6145 5 років тому

    I seem to have already seen this dataset :). Thank you for the demo on the isinscope() function.

    • @CurbalEN
      @CurbalEN  5 років тому

      Multipurpose dataset 😉
      /Ruth

  • @mstrixie29
    @mstrixie29 2 роки тому

    This is amazing!! Thank you so much. You have save me so much time

    • @CurbalEN
      @CurbalEN  2 роки тому

      At your service !!

  • @missalexpancakes
    @missalexpancakes 5 років тому

    Awesome solution, thank for sharing

  • @possibilitisbusinessintell4728

    How do we do if we have blanks in more than one level? That's he problem I have

  • @vitorcosta8087
    @vitorcosta8087 2 роки тому

    Excellent, that's what I need

  • @sedatemirtuncer9455
    @sedatemirtuncer9455 5 років тому

    I like your gestures, You're so pretty :)
    Thanks for the great&helpful video.

  • @itsyoko3477
    @itsyoko3477 3 роки тому

    Also this method is not working when there is values like start date and finish date , blanks are still there

  • @InfernoHellfire30
    @InfernoHellfire30 3 роки тому +1

    Thank you very much!

    • @CurbalEN
      @CurbalEN  3 роки тому +1

      Pleasure is all mine :)

  • @ultraseb1956
    @ultraseb1956 5 років тому

    ruth muchas gracias , excelente solucion , siempre tan bien explicado.

    • @CurbalEN
      @CurbalEN  5 років тому

      Todo un placer ;)
      /Ruth

  • @zarafarhadi7437
    @zarafarhadi7437 3 роки тому

    Hi, Thanks a lot, Could you please let me know how show parent values on parent instead of aggregation of child values? I used your code to remove Blank and add Selectedvalue() function in Else part of Switch. It works but some parents have value others not. and when I filter the child, Its parent's value changes to child's value.

    • @maxschrijen6142
      @maxschrijen6142 2 роки тому

      Hi Zara, I am currently also struggling with this, did you perhaps find a solution for this? Kind regards!

  • @davidgromer2117
    @davidgromer2117 4 роки тому

    Imagine I have some Cost or Profit Colum in my original flatten table for each task? Is there a way to use this workaround and also display my profit or costs right next to the hierarchy for the corresponding node without having blanks?

    • @CurbalEN
      @CurbalEN  4 роки тому

      The details are important, pleas post in the power Bi community and give as many details as possible.
      /Ruth

  • @diogovaz8633
    @diogovaz8633 5 років тому

    Very helpful! But then, when you try to export the matrix to csv, the csv is empty. Why ?

    • @CurbalEN
      @CurbalEN  5 років тому

      Really? Didn’t know that. Can you ask the power bi team at the power bi community?
      /Ruth

  • @dorianepouako2034
    @dorianepouako2034 4 роки тому

    Very Helpful ! please cann you explain me haw i can use this with Power BI Connected directly with my azure Analysis Services ?. my data is in ssdt 2019. i didn't found the best way to remove the blank . because i could'nt use power Query Editor.

    • @CurbalEN
      @CurbalEN  4 роки тому +1

      Ask the backend team to do that for you!
      /Ruth

    • @dorianepouako2034
      @dorianepouako2034 4 роки тому

      thx for your answer, please cann you explain it well for me . i am the one who have to do it. we dont have a Backend Team. do i have do to it in my SQL Server ?

  • @JoMaQui69
    @JoMaQui69 3 роки тому

    Thanks! I've implemented this trick successfully. However, I need to display a text value instead of a numeric value, I need to be the value of the last level of the hierarchy. Can someone help me? I can't find a workaround. Thanks!

    • @maxschrijen6142
      @maxschrijen6142 2 роки тому

      Dear Jose, I am currently also struggling with this problem. Did you perhaps find a solution for this in the meanwhile? Kind regards!

  • @agatagolec5211
    @agatagolec5211 4 роки тому

    Hi, this is a great solution but have anyone maybe found some workaround or a solution to these (+) icons other than just removing them? I would really like to have them working properly in this situation.

  • @writetoprithvi
    @writetoprithvi 4 роки тому

    nice trick

  • @feng3625
    @feng3625 5 років тому

    fantastic

  • @powerbinareal
    @powerbinareal 4 роки тому

    TOP!

  • @michazawal7063
    @michazawal7063 4 роки тому

    I have dataset in which I would like to kill blanks in top levels of my hierarchy, perfectly to not display level of hierarchy which are having blanks. Is there a way to do this with Isinscope? Thank you!

    • @CurbalEN
      @CurbalEN  4 роки тому

      Maybe this will help?
      ua-cam.com/video/YEuxONjCl1A/v-deo.html
      /Ruth

  • @sapannkumarjain
    @sapannkumarjain Рік тому

    Not working please advise

  • @techmaniac406
    @techmaniac406 8 місяців тому

    Super! Thanks a lot for this method!

  • @brotherscompany5254
    @brotherscompany5254 3 роки тому

    Thank you very much!!!

  • @mtosattiable
    @mtosattiable 3 роки тому

    Thank you very much!