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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
drallam
Helper II
Helper II

Generating Points based on an equation

HI,

 

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.

 

3 REPLIES 3
Anonymous
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?

Anonymous
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

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