Forum Discussion

computermike's avatar
computermike
Icon for Helper I rankHelper I
9 years ago
Solved

How can I use a DAX query

I wrote a dax query that returns a table.  How would I use this in my report?  Do I have to add it to my model?  Can I use it behind a chart without adding to my model?  Can I display on a grid?

 

Thanks,

 

Mike

  • Anonymous's avatar
    Anonymous
    9 years ago

    On the modeling ribbon there is a "New Table" button, where you put your dax query, and <poof>.  A new table is hanging out, refreshed only when you refresh your dataset (so, it is static).

     

    It's not super clear what your "goal" is... what your asking would certainly be an atypical way of creating a report.

     

    Typically you just drag over columns from existing tables, and write a few measures to do fancy calculations, then bob's ur uncle.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    There is no way to "display the results of this query in a visual" directly.  You can create a calculated table, then add each of the columns to your visual...

    • computermike's avatar
      computermike
      Icon for Helper I rankHelper I

      Not familiar with calculated table.  Is that a table in my data model?  So I would add it to my data model?  I am also wondering about relationships...   Would I leave it sitting by itself?  try and connect it to my fact table?   But what if the grain of the fact is different?

      • Anonymous's avatar
        Anonymous
        Not applicable

        On the modeling ribbon there is a "New Table" button, where you put your dax query, and <poof>.  A new table is hanging out, refreshed only when you refresh your dataset (so, it is static).

         

        It's not super clear what your "goal" is... what your asking would certainly be an atypical way of creating a report.

         

        Typically you just drag over columns from existing tables, and write a few measures to do fancy calculations, then bob's ur uncle.