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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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