[Music] hi everyone welcome to geek recorders power bi learning channel so today i'm going to explain you count count x count a count a x dax function and a simple use cases of it so if you are visiting my channel for the first first time please subscribe to my channel for more power bi videos press subscribe and click the bell icon so you will never miss any power bi updates from geek decoders so in my tutorial my data sheet contains sales person item sales value sales date feedback sales country and priority customer so this data
sheet actually you can download the link is mentioned in the description section so first i will take count for that to demonstrate that go and create a new measurement right in the measurement i write count so i use count function so as you can see if i type count count counts and numbers in the column so here i use count and here as column i would say i will do feedback right so my function is done my count function uh the measure that is written is available so i will put it into this card right
so count display as nine so if i check the data source this is the feedback column that i have used for the count function so there are 1 2 3 4 5 6 7 8 9 so it will omit the blanks and give the count of the number of rows right so same as count i will use count a function now count a equals so this is the measure i would write count a count the number count the number of value values in a column so same as count right so i'll be reduced like this
same as before i will use the feedback as count right so count a function also available i will add it to this card by removing this right so as you can see there's no any change there the same number uh is came for count a function as well so then what is the different so to find out the difference for the count function i will add a column here so i will use customer priority customer field here so as you can see now the count function or the count measure measure is not you know correctly
display right so now we are going to add same column to count a function as well right so for the count a function also now i'm going to use a different column same column that i have used for count column priority customer right so as you can see count a function now value is started or value is display so that is the actual difference so basically with count we can't use boolean columns for the count a function we can use booleans so as you can see the priority customer is a boolean here the data type
is true or false so count a function accepts boolean but when some count it will not accept boolean so that is the main different when you are doing or when you are developing something in power bi dashboard right so now i will demonstrate count x function so for that also i will create a new measurement new measure so here i will use count x and i will use count x function right so here as you can see uh first i have to give a table so what it does is count the number of values which
result for evaluating an expression for each row of a table that means i mean instead of giving the full table we can give a filtered table so that is the purpose of it so first i will give the full table sheet1 and here expression wise so i want the count x of let's say sheet1 feedback right so i'm going to add this count x2 here this card right so that also display the same number as count so what is the different so difference here is instead of sheet 1 we can give filters that means we
can get a set of rows in the table by using the filter so i will use a filter here filter table is sheet 1 and then filter expression is we say sheet1 dot let's say sales country equals india right right so as you can see now the count x function displaying only two so that means count x function took only this row and this is blank so it will not use this one so it will not accept blanks and this one so these are the two rows that which was output from the countex function so
now we'll demonstrate count ax function i think that is that straightforward so that means this will count ax function will accept boolean or true or false data type but count x will not accept true or false so let's demonstrate it and see how it works so in here previously written count x function i will add a new column priority customer as you can see the visual says can't display the visual so with the context function with the data type true and false or boolean right so now we create a measure for count a x function
so i would say count ax so here i will use a field the same filter filter sheet1 filter expression would be sheet1 sales country equals india and here i would add expression wise sheet 1 the boolean value priority customer column right for this card i will add this count ax function or the measure that we have created as you can see now it started to display with the boolean values so i hope you get a good understanding about count count x count a can count ax functions with these use cases and thanks for watching my
video uh please subscribe to my channel please keep in touch and please share it with your friends thank you