cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
VeluRavi Visitor
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, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
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, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 114 members 1,711 guests
Please welcome our newest community members: