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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Aradhana
Helper I
Helper I

Need to calculate UCL, LCL values for the previous 3 dates from "from date".

Hi All,

 

Below graph shows UCL and LCL values for the dates selected in the slicer. But the actual requirement is, need to show these values for previous 3 dates from "from date" in slicer and user can select any date as from and to date from DB. As per the below graph 6th April 2023 is from date and I need to calculate UCL,LCL for 3rd,4th and 5th April Diameter values.

 

Aradhana_0-1696513734227.png

 

I thought of passing "from date"  as a parameter value to either stored procedure or function in Postgres database to calculate UCL,LCL.  But we can use dynamic parameters only in powerbi desktop not in service as per most of the blogs.

 

In the below blog, they are showing how can we use SQL SP with dynamic parameters in powerbi service with some settings in SQL server and Powerbi.

https://www.youtube.com/watch?v=N1En6_NB_dY

 

But not sure, How can we achieve the same using postgre SQL.

Do you think Is there any other work around for my calculation.

 

Thanks in advance.

 

Thanks,

Har**bleep**ha

1 REPLY 1
lbendlin
Super User
Super User

As long as your data source is accessed in Direct Query mode you can use dynamic query parameters.

 

For your scenario you need to use a secondary, disconnected calendar table.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors