Page 52 - DAX-Formula-Reference-Guide-Enterprise-DNA_Neat
P. 52

DAX Formulas Reference Guide  |  Statistical Functions (DAX)




                Parameter                    Definition
                table                        The table containing the rows to be counted.

                expression                   An expression that returns the set of values that contains the values you
                                             want to count.



                Return Value:
                An integer.

                Example:
                The following formula returns a count of all rows in the Product table that have a list
                price.

                =COUNTX(Product,[ListPrice])

                =COUNTX(FILTER)(Product,RELATED(ProductSubcategory[EnglishProductSubcategoryNa
                me])=”Caps”,Product[ListPrice])


                CROSSJOIN Function (DAX)
                Returns a table that contains the Cartesian product of all rows from all tables in the
                arguments. The columns in the new table are all the columns in all the argument tables.

                Syntax: CROSSJOIN(<table>,<table>[,<table>]…)



                Parameter                    Definition
                table                        Any DAX expression thar returns a table of data.



                Return Value:
                A table that contains the Cartesian product of all rows from all tables in the arguments.


                Example:
                CROSSJOIN(Colors,Stationery)

                DATATABLE Function
                Provides a mechanism for declaring an inline set of data values.


                Syntax: DATATABLE(ColumnName1,DataType1,ColumnName2,DataType2…
                ,{{Value1,Value2…},{ValueN,ValueN+1…}…})

                Return Value:
                A table declaring an inline set of values.

                Example:
                =DataTable(“Name”,STRING,”Region”,STRING,(“User1”,”East”),(User2”,”East”),(“User3”,”W
                est”),(“User4”,”West”),(“User4”,”East”)))








                +64 21 164 5508  |  info@enterprisedna.co  52
   47   48   49   50   51   52   53   54   55   56   57