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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
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.