Forum Discussion

arjun0028's avatar
arjun0028
Regular Visitor
1 year ago

Quick Measure calculation Running Total

I have a line graph which calculates the running total of bc numbers on a daily basis.
A quick measure is created for calculating the running sum of BC_Number and the code is as follows. 

Running Sum of BC_Number =

CALCULATE(

    DISTINCTCOUNT('Booking Live Data'[BC_Number]),

    FILTER(

        ALLSELECTED('Booking Live Data'[BC_Date].[Day]),

        ISONORAFTER('Booking Live Data'[BC_Date].[Day], MAX('Booking Live Data'[BC_Date].[Day]), DESC)

    )

)

No output is obtained while using the formula as mentioned

7 Replies

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

     

    CALCULATE(
        DISTINCTCOUNT('Booking Live Data'[BC_Number]),
        FILTER(
            ALLSELECTED('Booking Live Data'[BC_Date].[Day]),
            'Booking Live Data'[BC_Date] <= MAXX( ALLSELECTED('Booking Live Data'[BC_Date]), 'Booking Live Data'[BC_Date] )
        )
    )

     

  • Hi arjun0028 ,
    Replace DISTINCTCOUNT by COUNT in the DAX formula:

     

    Or change summarization of base value to "Count" in quick measure window:

     

     

    Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

    Proud To Be a Super User !!!
    LinkedIn

     

    • arjun0028's avatar
      arjun0028
      Regular Visitor

      The code didn't workout while using the Summarization as Count and DISTINCTCOUNT. Pls share an alternative solution for the problem.

  • arjun0028 Try using

    DAX
    Running Sum of BC_Number =
    CALCULATE(
    COUNT('Booking Live Data'[BC_Number]),
    FILTER(
    ALLSELECTED('Booking Live Data'[BC_Date].[Day]),
    'Booking Live Data'[BC_Date].[Day] <= MAX('Booking Live Data'[BC_Date].[Day])
    )
    )

    • arjun0028's avatar
      arjun0028
      Regular Visitor

      Hi bhanu the formula which you shared isn't working. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi arjun0028 
    I wanted to check if you had the opportunity to review the information provided by Deku . Please feel free to contact us if you have any further questions. If his response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi arjun0028 

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.