Forum Discussion

drrai66's avatar
drrai66
Icon for Resolver I rankResolver I
8 years ago
Solved

Running Total Becomes Incorrect When I add Legend

Hi Everyone,

With the Support of this community, I was able to get the Running Total against Week Numbers. WEEK Number is on X AXIS and my Counts are on Y AXIS and It is ALL OK.

Now, What is happening is when I drag Status to Legend, The Running Total Becomes Incorrect. The running total also shows downward trend which should not be.

I have this  Sample data 

Week NumberCOUNTStatus
4285A
423C
4210D
4233G
4350A
432B
433C
433E
4335F
4390G
4380H
4457A
442B
4417C
442E
4446F
442G
4423H
4515A
452B
4530C
4514E
4589F
4588G
4599H
469A
467C
4650G
4620H
461I
471A
473C
471F
478G
479H
472I

 

I should be getting This, which I created in Tableau

FINAL VIEW DESIRED

 

But I am Getting This

 

This is Incorrect

Please advice

Thanks

Deepak

 

 

  • parry2k's avatar
    parry2k
    8 years ago

    in x axis, click arrow next to you field and select "Show items with no data" and see if that helps.

  • Oh...Great...that's it ..Hurrey..Thanks Thanks..

    Deepak

8 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi drrai66

     

    I think this calculated measure is close

     

    My Running Total = CALCULATE(
    						SUM('Table1'[COUNT]),
    						FILTER(
    							ALLEXCEPT(
    								'Table1',
    								Table1[Status]
    								),
    							MAX('Table1'[Week Number]) >= 'Table1'[Week Number])
    							)

     

     

  • Hi drrai66,

     

    Try this measure

     

    =CALCULATE([Total],FILTER(ALL(Data[Week Number]),Data[Week Number]<=MAX(Data[Week Number])))

     

    Hope this helps.

     

    • drrai66's avatar
      drrai66
      Icon for Resolver I rankResolver I

      Hi Ashish,

      Can you attach your Solution.

      Thanks

      Deepak

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Hi,

         

        What problem are you facing when trying my suggeted formula.  Share the download link of your PBI file.