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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Josef2
New Member

queries as basis for reports / Save query as a view

Dear all,

is it possible to use SQL-queries as a basis for reports?

We have prepared some which we would like to use similar to tables as basis for reports/visuals etc.

Does anyone know how to do?

It has been announced as feature Datamarts DML / DDL (under review): Save query as view (coming soon)” https://powerbi.microsoft.com/en-us/blog/power-bi-datamart-january-2023-feature-summary/

 

Many thanks in advance.

 

Kind rgds

Josef

3 REPLIES 3
Martin_D
Super User
Super User

Hi @Josef2 ,

 

In the advanced settings of the SQL Server database connector you can use your SQL query as a basis for a report as per your requirement.

Martin_D_0-1713966593272.png

References:

Advanced Options: Getting Data into Power BI from SQL Server | by Mubar Dauda | Microsoft Power BI |...

Power Query SQL Server connector - Power Query | Microsoft Learn

 

Kind regards,

Martin

Hi @Martin_D ,

many thanks for your quick answer.

What I did not mention is that we receive the data from Jira via PowerBI-Connector.
We want to define some SQL queries ourselves and would like to know if there is a possibility to use the queries (their results) similar to the tables as basis for reports/visuals..?

Josef2_0-1713971165413.pngJosef2_1-1713971292604.png

 

Many thanks in advance.

kind rgds

Josef

Hi @Josef2 ,

The query language for Power BI data models is DAX, not SQL. You can express the same query in DAX. And you can load the result of this DAX query as a calculated table to the data model. Then the result of the query becomes part of the data model and you can use it in visuals.
Here are a few ideas to get started with translating your SQL into DAX: From SQL to DAX: Joining Tables - SQLBI
Kind regards,
Martin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors