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.
i am using wonderware historian which based on INSQL(industrial SQL ) bewlow query to retrive certain tag ('mesCANFiller02.stOperatingState')
i have to specifiy startdata and Enddata in my query as fixed value to let this query work .
My question . how can i make this query dynmaic means link this query with slicer.
SET NOCOUNT ON DECLARE @StartDate DateTime DECLARE @EndDate DateTime SET @StartDate = DateAdd(hh,-24,GetDate()) SET @EndDate = GetDate() SET NOCOUNT OFF SELECT * FROM ( SELECT History.TagName, DateTime, Value, vValue, StartDateTime FROM History WHERE History.TagName IN ('mesCANFiller02.stOperatingState') AND wwRetrievalMode = 'Delta' AND wwQualityRule = 'Extended' AND wwVersion = 'Latest' AND DateTime >= @StartDate AND DateTime <= @EndDate) temp WHERE temp.StartDateTime >= @StartDate ORDER BY DateTime DESC
Solved! Go to Solution.
HI @Anonymous,
It is impossible to send slicer selection data to query editor as filter parameter.
Date levels:
Database -> Power query(query table, query parameter, custom function) -> Data model(calculated column/table, RLS) -> Data view(measure, visual , slicer)
Notice: Parent level can affect child but child is impossible to affect its parent.
For your scenario, you can only use query parameter to get dynamic result table.
Deep Dive into Query Parameters and Power BI Templates
Regards,
Xiaoxin Sheng
Hi @Anonymous ,
This is a late reply but there is a quicker and more user friendly to conenct to Wonderware historians (and many, many more). Check this blog post in Power BI Community Blog.
HI @Anonymous,
It is impossible to send slicer selection data to query editor as filter parameter.
Date levels:
Database -> Power query(query table, query parameter, custom function) -> Data model(calculated column/table, RLS) -> Data view(measure, visual , slicer)
Notice: Parent level can affect child but child is impossible to affect its parent.
For your scenario, you can only use query parameter to get dynamic result table.
Deep Dive into Query Parameters and Power BI Templates
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |