Forum Discussion

Giancarlo1977's avatar
Giancarlo1977
Frequent Visitor
2 years ago
Solved

Cumulative formula inside IF formula

Hi Team,

 

I am looking for a formula that can help me in planning my repair. I have an if function but eventually I need to reapply the calculation based on the new value coming after the previous calculation.

 

The below screen can explain better what I am looking for

This is my main formula. But the value of UR should be re-evaluate based on how many I repaired the previous week

 

My Result should be in the Cumulative Under Repair for same Concatenate Tool Code (which is wrong now!)

 

For 19 May = 2 (just the qty I neew based on String per week)

26 May = 0 (no demand so no need to repair)

2 Jun = 1 (because I have already repaired 2 19 May so my new count of UR is 1 and RTG is 40

9 Jun = 0 (because I have repaired all UR already)

21 July = 0 (because I have repaired all UR already)

 

 

I am struggling how to include this cumulative in the formula.

Anybody can help?

Appreciate all your support

 

Regards

 

5 Replies

  • you may not need to do this cummulative.

     

    Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

    Do not include sensitive information or anything not related to the issue or question.

    If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

    Please show the expected outcome based on the sample data you provided.

    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • Giancarlo1977's avatar
      Giancarlo1977
      Frequent Visitor

      lbendlin ,

       

      Thanks for your reply.

      I have attached a table with what I am looking for. Planner Repair Column is what I am looking to calculate

      ToolCodeWeekNameString per weekAVURRTGPlanned Repair
      aaaa140413382
      aaaa238413380
      aaaa342413381
      aaaa444413380
      bbbb115206141
      bbbb216206141
      bbbb317206141
      bbbb419206142
      • Giancarlo1977's avatar
        Giancarlo1977
        Frequent Visitor

        Hi,

        anybody can help me here?

        I am lost and it is difficult also to explain in formula what I am trying to achieve.

        At the moment I did in excel by adding different column everytime as per example below where:

         

        At the end RTG should be =< String number

         

        ToolCodeString W1String W2String W3String W4Total Available (UR+RTG)UR_1RTG_1Planned Repair_1UR_2RTG_2Planned Repair_2UR_3RTG_3Planned Repair_3UR_4RTG_4Planned Repair_4
        aaa4038424441338140014010410

         

        Where

        UR_1 = UR - Planned Repair_1

        UR_2 = UR_1 - Planned Repair_2 etc etc

        In other words I balance the UR to repair the one that I need to match WeekName

        Now since I have all project in PowerBI and I have to plan for 12 weeks I was trying to put in my Dashboard in a column so that it will be easier to monitor and the dashboard should look like this. Total Available, UR and RTG will not change. Planned Repair will be recalculated considering the new count of UR - Previous Planned Repair

        ToolCodeWeekNameString per weekTotal AvailableURRTGPlanned RepairNew URNew RTG
        aaaa140413382338
        aaaa238413380140
        aaaa342413381140
        aaaa444413380041

         

        I hope this will make more sense. I have no idea how to achieve this. I was trying with cumulative, Measure and previous Raw data but still no success

        Thanks a lot for your help