Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Dax Studio - Dax query created in Dax Studio

Hi, I've created a query in dax studio that exports the data, and I would like to use it inside of my BI Report, and also outside of the PowerBI universe as a separate function, running it regularly.

 

Two questions regarding this

1) How do I take the query and place it into my BI report?  Cannot see anything on using the code within a report. I want to be able to run it from My BI report.

2) Is there a way I can save it outside of the PowerBI universe and use it as a separate function outside of PowerBI universe? I'd like to be able to run it, but so far it seems i have to open up DAX studio to run it.

Thank you!

Here's my DAX query
/* START QUERY BUILDER */
EVALUATE
SUMMARIZECOLUMNS(
'Table Name'[Accepted Date],
'Table Name'[Accepted Iter],
'Table Name'[AcceptedDate],
'Table Name'[AcceptedIter-Curr-7],
'Table Name'[Active Days],
'Table Name'[Active End],
'Table Name'[BI ID],
'Table Name'[BI Name],
'Table Name'[Epic],
'Table Name'[Epic ID],
KEEPFILTERS( FILTER( ALL( 'Table Name'[Active Days] ), 'Table Name'[Active Days] >= 0 )),
"AcceptedIterAll", [AcceptedIterAll],
"Active Epics Iter", [Active Epics Iter],
"DistinctEpics", [DistinctEpics],
"DistinctFeatures", [DistinctFeatures]
)
ORDER BY
'Table Name'[Accepted Date] ASC,
'Table Name'[Accepted Iter] ASC,
'Table Name'[AcceptedDate] ASC,
'Table Name'[AcceptedIter-Curr-7] ASC,
'Table Name'[Active Days] ASC,
'Table Name'[Active End] ASC,
'Table Name'[BI ID] ASC,
'Table Name'[BI Name] ASC,
'Table Name'[Epic] ASC,
'Table Name'[Epic ID] ASC
/* END QUERY BUILDER */


1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

For your two questions, here are my views

If you want to apply the result of this dax query to your report, you just need to try to create a calculation table in PBI desktop and place the DAX expression after the Evaluate expression to achieve it, because the data model of PBI is the Analysis service data model used and the statement used is DAX.

 

As far as I know, the query created by the DAX statement is applied to the Analysis service data model. If you want to run it not only when you open the DAX studio, you can also connect to this PBI data model in the PBI desktop or through SSMS using the XMLA endpoint and query the data model to run it normally.

Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Anonymous ,

For your two questions, here are my views

If you want to apply the result of this dax query to your report, you just need to try to create a calculation table in PBI desktop and place the DAX expression after the Evaluate expression to achieve it, because the data model of PBI is the Analysis service data model used and the statement used is DAX.

 

As far as I know, the query created by the DAX statement is applied to the Analysis service data model. If you want to run it not only when you open the DAX studio, you can also connect to this PBI data model in the PBI desktop or through SSMS using the XMLA endpoint and query the data model to run it normally.

Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.