cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VeluRavi Frequent Visitor
Frequent Visitor

Running total issue

Hi all,

 

Please issue sample of my data set, My data is large data below i am showing sample

Client NameCase created datecase notype
a22/08/2019222x
a22/08/2019223x
a21/08/2019224x
b20/07/2019225y
b19/07/2019226y
b15/07/2019227y
b14/07/2019228z
c13/05/2019223z
c16/05/2019229z
c17/04/2019230z
c13/03/2019231x
c12/2/2019232x

 

I want to calcualte distinct count of client code based on cases id we received last 90 days by running total.  (last three months if we received cases from the client which means client is alive)

 

I want to represents the data like below to create visual

Total Alive clients  
 JulyAug 
X1615( cases received in last three months)
Y1714 
Z1812 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Running total issue

Hi @VeluRavi ,

Please try to use following measure formula if it suitable for your requirement:

Measure =
VAR curr =
    MAX ( 'Table'[Case created date] )
RETURN
    CALCULATE (
        COUNTA ( 'Table'[case no] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            [Case created date]
                >= DATE ( YEAR ( curr ), MONTH ( curr ) - 3, 1 )
                && [Case created date] <= curr
        ),
        VALUES ( 'Table'[Client Name] )
    )

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Running total issue

Have you tried using the built-in Running Total Quick Measure? Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Community Support Team
Community Support Team

Re: Running total issue

Hi @VeluRavi ,

Please try to use following measure formula if it suitable for your requirement:

Measure =
VAR curr =
    MAX ( 'Table'[Case created date] )
RETURN
    CALCULATE (
        COUNTA ( 'Table'[case no] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            [Case created date]
                >= DATE ( YEAR ( curr ), MONTH ( curr ) - 3, 1 )
                && [Case created date] <= curr
        ),
        VALUES ( 'Table'[Client Name] )
    )

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)