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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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