DAX Queries, Part 6

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Reposted from Chris Webb's blog with the author's permission.

Before I start this post, I’d like to mention that Cathy Dumas of the dev team has started blogging on BISM topics here: http://blogs.msdn.com/b/cathyk/. There are some good posts up already, with more to come I’m sure.

Anyway, back to DAX queries. Just a quick post today about the ROW() function, which returns a table containing a single row of data. Here’s an example of its use inside a query:

evaluate(
row(
"Column 1"
, "Some text"
, "Column 2"
, countrows(dimdate)
)
)

image

It’s pretty simple: the parameters represent a series of column name/DAX expression pairs for your table, so in this example I’m defining a table with two columns and one row, with the first column returning the text “Some text” and the second column returning the result of the expression countrows(dimdate). I understand it is intended for use by client tools such as Crescent when they want to return a series of grand totals without any detail data.


chris-webb

Chris has been working with Microsoft BI tools since he started using beta 3 of OLAP Services back in the late 90s. Since then he has worked with Analysis Services in a number of roles (including three years spent with Microsoft Consulting Services) and he is now an independent consultant specialising in complex MDX, Analysis Services cube design and Analysis Services query performance problems. His company website can be found at http://www.crossjoin.co.uk and his blog can be found at http://cwebbbi.wordpress.com/


Tags: dax

 

2007-2015 VidasSoft Systems Inc.