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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Automatically create measures from a result of SQL Query

Hello all,

I'm trying to give some independance to users by giving them the possibility to create their own power BI report based on a SQL query that they can customize.

 

Basically, the result of the query is :

- one column of "datetime" with datetime value

- n columns of "sensors" (flowmeters, thermometer ...) with numeric values 

 

=> sensors columns may vary, depending on the SQL query, from 2 to >100 columns. 

 

And the visuals on Power BI should be quite simple : bar/line chart with :

x = datetime

y = measure based on 1 sensor, with the possibility to show several measures   

 

=> I want to avoid creating measures automatically : because of the numbers of measures possibles (>100), and also because the list of sensors will always vary.
=> I'm trying to generate automatically measures for each sensor (so for each column) by selecting it through a slicer. Do you think it is possible?

 

 

 

Many thanks for your help, i didn't find any solutions in the forum and on the web (nor chat gpt ;))

 

datesensor 1sensor 2sensor 3
01/01/2023183
02/01/20237110
03/01/20232910
04/01/2023295
05/01/20239510
06/01/2023315
07/01/2023796
08/01/2023982
09/01/2023984
10/01/2023545
11/01/20231029
12/01/2023721

 

 

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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