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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper II
Helper II

Generating Points based on an equation



I have a equation let's say Y= ((Ymax-Xnum)/(Xmax-Xavg)) . Here we know Ymax, Xmax and Xavg which are given and Xnum is driven by a duration and starts from 1. (Eg: If the Duration is 50 then  there are 50 Xnums from 1-50) For each project meaning if you have 10 projects there will be 10 X 4 Known points in a table. Each project is in one row. Please see Image 1

Image 1Image 1Image 2Image 2

Now I want to create another table for those 50 points for Y so I can plot that in a graph. How do I achieve this in power BI. Using R? Please see Image 2 for final table result,. the Xnum will eventually replace by a date and increased by 7 days for each project.


Not applicable

You could do the majority of the work with a single measure.  Create that equation as a measure and plot it onto a graph as the "Value".  By providing the Projects in the legend, you will get a graph.  You need another Axis, which is your described Xnum.

To make that work, create a table that simply has the XNums you wish to iterate over.  It could be a simple 1 column table of values from 1 to whatever.  Join that table to your other tables and use that xNum column as your axis.

But the problem is, the single measure would use Xnum in the formula. How do I accomplish that?

Not applicable

Thats where using the table of XNum values and placing it as an Axis on the graph produces those results. Measures are recalculated for each context.  In this case, by using the Axis, you are creating a context for each and every XNum.

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.