简体   繁体   中英

Powerpivot: create a data model from a DAX query

Is it possible to create a data model (on which I can run a DAX query) from the output of a DAX query? (both tables being autoupdated from a db backend, not static - so no copy paste or convert to excel table)?

My requirement is this: I have a table, say Orders, and I need to calculate the percentile of sales from a particular region. For this, my approach would be -

First calculate a table with the =SUMMARIZE function, creating a table grouped by regions, and then implementing the percentile algorithm on it (by ranking it and putting it into percentile buckets - there are some articles on the net on how to do that, since DAX doesnt have a percentile function). For this to happen, I need to create the intermediate live table from the SUMMARIZE function and put it an excel sheet. Then I need to run the rank function on the new table (assuming it can be done).

Is this possible?

So, I found a workaround for this: http://www.powerpivotblog.nl/implementing-histograms-in-excel-2013-using-dax-query-tables-and-powerpivot/

Thanks to Kasper.

So in summary, we create an Excel table, driven by a DAX query, so that I can use the percentile function in Excel.

This is a good generic method to use live tables in Excel.

sargeMonkey, what about "good old" Show Values As option available in both regular and power pivot tables:

在此处输入图片说明

Wouldn't that be the quickest solution?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM