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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Plot a graph based on if analysis

I currently have a column of data that shows actual lead time for each order. If actual lead time is less than or equal to requested lead time, then OTIF condition is met. I want to plot a graph of the % of orders that meet OTIF against the requested lead time (range of 0-120 days). Basically, I need a measure or something to run in a loop to plot the graph. So, if requested lead time is 1, then calculate the % of orders that meet OTIF, and plot the data point. If requested lead time is 2, then calculate the % of orders that meet OTIF and plot the data point, and so on. Is there a code or something that can do this?

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

Sales OrderActual Lead time (days)If lead time requested=70 days
1062266140OTIF
1062266952OTIF
1062272256OTIF
1062272548OTIF
1062273061OTIF
1062273327OTIF
1062275175MISS
1062275368OTIF
1062276262OTIF
1062276262OTIF
1062290076MISS
1062290382MISS
1062290594MISS
10622912104MISS
10622916139MISS
10622918107MISS
10622921131MISS
1062471744OTIF
1062491161OTIF
1062634787MISS
10626350102MISS
10626350102MISS
10626794135MISS

 

% of orders with OTIF (for requested lead time of 70 days) = 11/23*100= 47%

 

So basically for each lead time requested (range of 0-140 days), calculate the % of orders with OTIF. Then plot the y value (% of orders with OTIF) against the x value (lead time requested).

Hi @Anonymous 

 

Not quite understand what you're looking for, what's your expected results? and how's the calculate logic?

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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