Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I'm trying to create a dynamic table which will receive an input for minimum and maximum targets. The query should then add rows with 0.1 increments.
What I find difficult is that a column called "Payout" should correspond to the minimum Target and calculate increments until the maximum payout.
I've added a screenshot so it's easier to visualise. Basically, my inputs are the table below:
It should calculate the increment, (in this case, 1.5%) and create a column like this:
Note that past 98%, the payout is capped at 120%, as this represents the max.
Solved! Go to Solution.
hello, @mt_729
let
Source = your_table,
gen = List.Generate(
() => [Target = Source{[Type = "Minimum"]}[Target], Payout = Source{[Type = "Minimum"]}[Payout]],
(x) => x[Target] <= Source{[Type = "Maximum"]}[Target],
(x) => [Target = x[Target] + .001, Payout = List.Min({Source{[Type = "Maximum"]}[Payout], x[Payout] + .015})]
),
z = Table.FromRecords(gen)
in
z
hello, @mt_729
let
Source = your_table,
gen = List.Generate(
() => [Target = Source{[Type = "Minimum"]}[Target], Payout = Source{[Type = "Minimum"]}[Payout]],
(x) => x[Target] <= Source{[Type = "Maximum"]}[Target],
(x) => [Target = x[Target] + .001, Payout = List.Min({Source{[Type = "Maximum"]}[Payout], x[Payout] + .015})]
),
z = Table.FromRecords(gen)
in
z
Hi, @mt_729
First, you need to create a basic table with your minimum and maximum target values. You can enter these directly in Power BI using "Enter Data" from the Home ribbon or import them from an external source. (I am guessing you have one already)
* create a calculated table
TargetTable =
VAR MinTarget = 95.0
VAR MaxTarget = 98.0
VAR TargetIncrement = 0.1
VAR MinPayout = 75
VAR PayoutIncrement = 1.5
VAR MaxPayout = 120
RETURN
GENERATESERIES(MinTarget, MaxTarget, TargetIncrement)
this dax will create a single column table with values from 95.0 to 98.0 incremented by 0.1.
Now add a calculated column in your newly created TargetTable
Payout =
VAR BasePayout = [Target] - 95.0
RETURN
IF(
[Target] <= 98.0,
MIN(MinPayout + (BasePayout * (PayoutIncrement / TargetIncrement)), MaxPayout),
MaxPayout
)
Replace [Target] with the actual column name that contains the target values.
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.