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
Anonymous
Not applicable

Updating data from a table with what-if parameter

Hi everyone, 

 

So I have to build a table with demand, production, initial stock and final stock like this:

dreyss_0-1622021202282.png

And i have a what-if parameter that is able to change the value of production on the first date.
The source table is (if necessary, its structure may change):

dreyss_2-1622022193205.png

 

With all of this,  how can i build a table like that, where in addition the production value for the first date may change dynamically?

Regards,

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

Current power bi does not support creating dynamic calculate column/table based on filter/slicer.  You can write a measure formula to interact with filters.

Notice: the data level of power bi.

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous,

Create measure for Production

 

Production =

VAR firstDate = CALCULATE(MIN(<Date Column>), ALL(<Date Column>)

VAR currentDate = MAX(<Date Column>)

VAR ProdValue = CALCULATE(SUM(Table{Value]), Table[Detail]="Production")

VAR dynValue = <What-if Measure>

RETURN

IF(currentDate  = firstDate, ProdValue  + dynValue,  ProdValue  )

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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