Тёмный

DAX Fridays!  

Curbal
Подписаться 138 тыс.
Просмотров 3,2 тыс.
50% 1

Опубликовано:

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@kingparc
@kingparc 5 лет назад
Hi Ruth, if you read the definition of the isnontext() function, you will notice that in dax, empty strings are considered as text. the solution is to change, in PQ, the empty value by "null". Thanks :) docs.microsoft.com/en-us/dax/isnontext-function-dax
@CurbalEN
@CurbalEN 5 лет назад
I forgot about that!! Daaamn! The video will still help those who don’t know that :) Happy Friday! /Ruth
@mehdihammadi6145
@mehdihammadi6145 5 лет назад
Hi Ruth, I highlighted this behavior since the function was first announced and I did not received a clear response (you can reveiw the comments on the announcement post). The reason why it work with number and not with text is because for numeric fields blanks are considered as (or implicitely converted to) nulls witch is not the case for text fields, blanks stay blanks (are converted to empty string). Inspect your table using the data profiling tool and you will see that for the text column the count of blank is 0. To be sure that the function work with text fileds you have to replace any blank with null. I think that the description of the function have to be changed or it name have to be DistinctCountNoNull
@CurbalEN
@CurbalEN 5 лет назад
That is the best suggestion ever! For sure! Thanks for sharing :) /Ruth
@ginameronek8068
@ginameronek8068 5 лет назад
I'd definitely like to see a video that goes through empty string vs blank vs null in Power BI and the techniques for data prep/replacement. If you're not coming from a development or advanced DB background, you might not have a clear understanding of how data might contain 2-3 variations on "nothing" or "undefined".
@CurbalEN
@CurbalEN 5 лет назад
You are sooo right!! It might also set it my thick head too ! ;) /Ruth
@arklur3193
@arklur3193 5 лет назад
As others already pointed out, empty strings are not considered blank. What you can do is convert empty strings to null/blank in PQ editor, or you can write your own "DISTINCTCOUNTNOBLANK" for strings: DistinctLettersNoBlank = CALCULATE ( DISTINCTCOUNT ( Data[Letters] ); NOT ( ISBLANK ( Data[Letters] ) ) && Data[Letters] "" )
@CurbalEN
@CurbalEN 5 лет назад
Noted, thanks! /Ruth
@shankrukulkarni3234
@shankrukulkarni3234 Год назад
Thank you very much @arklur3193, I just followed your way it helped me.
@InkyPhys
@InkyPhys 5 лет назад
Hi Ruth What about counting dates? I distinctcount dates in a delivery report. Thanks
@andrecavasotero6234
@andrecavasotero6234 5 лет назад
Excellent observation. Thanks for sharing, I did not know the limitation of the function to numbers.
@CurbalEN
@CurbalEN 5 лет назад
Make sure you check the comments, i forgot the difference about empty and null! /Ruth
@andrecavasotero6234
@andrecavasotero6234 5 лет назад
@@CurbalEN Yes, I saw it.
@CurbalEN
@CurbalEN 5 лет назад
Awesome :) /Ruth
@MarkCBB86
@MarkCBB86 5 лет назад
That is an interesting catch, thank you for sharing. Quick question, in your dataset are they blank records or null?
@CurbalEN
@CurbalEN 5 лет назад
Yeah, hoss mentioned that in his comment, it is because I have empties instead of nulls...DAXFridays miss!! But I am sure others will make the same mistake so I will leave the video on. Happy Friday! /Ruth
Далее
Борщ в стиле высокой кухни!
00:57
Why is there a blank in my Power BI slicer???
6:55
Просмотров 117 тыс.
Related and RelatedTable in DAX
8:48
Просмотров 58 тыс.
DAX Fridays #12: SUM of distinct values
12:18
Просмотров 70 тыс.
DAX Fridays! #171: Distinctcount with blanks
2:42
Просмотров 3 тыс.