Forum Discussion

Rajesh_R1's avatar
Rajesh_R1
Frequent Visitor
5 years ago

running total for specific value

Hi,

 

I have the below table, in which i calculated the running total. Can any one suggest how to create a seperate measure which filter only the Running total value when  SOTAT days at 1? 

 

Below are the feild details.

 

SOTAT Days = 0 day, 1 day, 2 day etc

Count of SAPOrderNo = no of orders closed in each days from the regions SEA and SPAC

%GT Percentage of SOTAT = Count of SAPOrderNo/Total Count of SAPOrderNo

%GT Running Total = Running total of %GT Percentage of SOTAT

 

Formula Used: 

 

SOTAT Days=
CALCULATE(
COUNTROWS( 'Date'),
DATESBETWEEN(
'Date'[Date],
'Daily SOTAT'[HPReceiveDate],
'Daily SOTAT'[LastCleanedDate]),
'Date'[is Workday] = 1,
ALLSELECTED('Daily SOTAT')
)-1
 
Percentage of SOTAT =
DIVIDE(
COUNT('Daily SOTAT'[SAPOrderNo]),
CALCULATE(
COUNT('Daily SOTAT'[SAPOrderNo]),
ALLEXCEPT('Daily SOTAT','Daily SOTAT'[HPReceiveDate],'Daily SOTAT'[SAPOrderNo])
)
)*100
 
Running Total =
SUMX(
FILTER(
ALLSELECTED('Daily SOTAT'[SOTAT Days]),
'Daily SOTAT'[SOTAT Days] <=MAX('Daily SOTAT'[SOTAT Days])
),
[Percentage of SOTAT]
)
 
Thanks,
Raj

4 Replies

  • Rajesh_R1 , Try a measure like

     

    Running Total % =
    divide( SUMX(
    FILTER(
    ALLSELECTED('Daily SOTAT'[SOTAT Days]),
    'Daily SOTAT'[SOTAT Days] <=MAX('Daily SOTAT'[SOTAT Days])
    ),
    [count of SAP order No ]
    ), calculate([count of SAP order No ], ALLSELECTED('Daily SOTAT'[SOTAT Days])))

  • Rajesh_R1's avatar
    Rajesh_R1
    Frequent Visitor

     amitchandak Many Thanks Amit,

     

    I have already calculated the Running total, what i am looking at some thing like below. A measure to show  what is the %GT Running Total alone when SOTAT Days at 1

     

     

    Thanks and Regards,

    Rajesh

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Rajesh_R1,

        Did you mean to show the rolling total on the row which has the special category type values?
        If that is the case, you can write if statement to check the current type to navigate to different calculation formulas. (other types to common calculation, specific type to rolling total)

        Regards,

        Xiaoxin Sheng