March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have to create a lag repot in below format
In this case, Value 14,241 no of accounts were opened as on 30 April 18, and are active in April 2018.
14016 no of accounts were opened as on 30 April 18 but only this account are active in May 31 18 and so on
Likewise
18,116 no of accout were opened as on 31 May 2018, and successive number "17,818","17623"...are active in following months.
Which dax can be used to calculate
The data is related to bank. We have below columns in one table
Column name | Description |
ACNTS_CLIENT_NUM | Client number |
IACLINK_ACTUAL_ACNUM | Actual Account number |
ACNTS_OPENING_DATE | Opening date |
ACNTS_CLOSURE_DATE | Closing date |
AS_ON_DATE | Balances as on date |
@PriyankaA905 ,Do you have open and close date ?
What you need is an approach to this blog means two date tables, one for creation/open date and another to know open cases
Period Of Stay – Cohort Analysis: https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-3-Period-Of-Stay-Cohort-Anal...
Part of this will come from
you need 2 date tables not 1 like the HR blog
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
We have open and closed dates
@PriyankaA905 , Take two date tables, Use one date table to create a measure like Current Employee (no join needed, you can avoid cross join then)
and another one for the start date (Join with start date)
We dont have separate Date Dim . The date is in same table as open and close data
The data is related to bank. We have below columns in one table
Column name | Description |
ACNTS_CLIENT_NUM | Client number |
IACLINK_ACTUAL_ACNUM | Actual Account number |
ACNTS_OPENING_DATE | Opening date |
ACNTS_CLOSURE_DATE | Closing date |
AS_ON_DATE | Balances as on date |
Hi, @PriyankaA905
At present we don't know the direct connection between your logic and data. Please provide a valid sample, otherwise it will be difficult for us to help you.
You need to read the doc first:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Best Regards,
Community Support Team _ Janey
Please refer to below image for better understanding
Column name | meaning |
ACNTS_BRN_CODE | Branch code for a specific account |
ACNTS_CLIENT_NUM | customer number |
IACLINK_ACTUAL_ACNUM | Customer's account number. |
ACNTS_PROD_CODE | Product code with respect to the transaction |
ACNTS_AC_TYPE | Accounts type code |
ACNTS_OPENING_DATE | Acoount opening date |
ACNTS_CLOSURE_DATE | Account closing date |
AS_ON_DATE | Month end date |
CURRENT_BALANCE_ASON | Balance as on last date of month |
The rows and columns in this matrix correspond to which date column you have, and what logic is used to calculate the values in the matrix, and which column number is calculated, you have to make it clear.
Please do not take screenshots, share sample data in table format or link, otherwise we can't replicate the test data.
Thank you.
Best Regards,
Community Support Team _ Janey
April 2018, March 2018,... we have made duplicate column of AS_ON_DATE with Month and year in it
30 April 2018, 31 May 2018, ... is a AS_ON_DATE column
We have used distinct values of IACLINK_ACTUAL_ACNUM for values
ACNTS_BRN_CODE | ACNTS_CLIENT_NUM | IACLINK_ACTUAL_ACNUM | ACNTS_PROD_CODE | ACNTS_AC_TYPE | ACNTS_OPENING_DATE | ACNTS_CLOSURE_DATE | AS_ON_DATE | CURRENT_BALANCE_ASON |
5111 | 2220010 | 1001010001450110 | 1 | 55201 | 6/21/2017 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 40 |
5112 | 2220011 | 1001010001450111 | 2 | 55202 | 6/21/2017 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 10800 |
5113 | 2220012 | 1001010001450112 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 1250 |
5114 | 2220013 | 1001010001450113 | 3 | 50501 | 12/24/2020 12:00:00 AM | 12/24/2020 12:00:00 AM | 2/28/2021 12:00:00 AM | 100 |
5115 | 2220014 | 1001010001450114 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 100 |
5116 | 2220015 | 1001010001450115 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 5350 |
5117 | 2220016 | 1001010001450116 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 100 |
5118 | 2220017 | 1001010001450117 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 3800 |
5119 | 2220018 | 1001010001450118 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 2/28/2021 12:00:00 AM | 3800 |
5120 | 2220019 | 1001010001450119 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 100 |
5121 | 2220020 | 1001010001450120 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 5700 |
5122 | 2220021 | 1001010001450121 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 100 |
5123 | 2220022 | 1001010001450122 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 100 |
5124 | 2220023 | 1001010001450123 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 1250 |
5125 | 2220024 | 1001010001450124 | 3 | 50501 | 12/24/2020 12:00:00 AM | 10/3/2021 0:00 | 3/31/2021 12:00:00 AM | 8900 |
5126 | 2220025 | 1001010001450125 | 3 | 50501 | 12/28/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 3050 |
5127 | 2220026 | 1001010001450126 | 3 | 50501 | 12/28/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 6200 |
5128 | 2220027 | 1001010001450127 | 3 | 50501 | 12/28/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 2 |
5129 | 2220028 | 1001010001450128 | 3 | 50501 | 12/28/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 390 |
5130 | 2220029 | 1001010001450129 | 3 | 50501 | 12/28/2020 12:00:00 AM | null | 3/31/2021 12:00:00 AM | 6200 |
5111 | 2220010 | 1001010001450110 | 1 | 55201 | 6/21/2017 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 40 |
5112 | 2220011 | 1001010001450111 | 2 | 55202 | 6/21/2017 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 10800 |
5113 | 2220012 | 1001010001450112 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 1250 |
5115 | 2220014 | 1001010001450114 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 100 |
5116 | 2220015 | 1001010001450115 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 5350 |
5117 | 2220016 | 1001010001450116 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 100 |
5118 | 2220017 | 1001010001450117 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 3800 |
5119 | 2220018 | 1001010001450118 | 3 | 50501 | 12/24/2020 12:00:00 AM | null | 4/30/2021 12:00:00 AM | 3800 |
Hi, @PriyankaA905
According to your description,I think you need to ceate a single column table as martix column and then create the measure to display count.
Table 2 = DISTINCT('Table'[AS_ON_DATE])
measure =
COUNTX (
CALCULATETABLE (
DISTINCT ( TABLE[IACLINK_ACTUAL_ACNUM] ),
FILTER (
ALL ( 'Table' ),
[ACNTS_OPENING_DATE] >= SELECTEDVALUE ( 'Table'[AS_ON_DATE] )
&& [ACNTS_CLOSURE_DATE] <= SELECTEDVALUE ( 'Table 2'[AS_ON_DATE] )
)
),
[IACLINK_ACTUAL_ACNUM]
)
Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
77 | |
58 | |
52 |
User | Count |
---|---|
196 | |
123 | |
107 | |
68 | |
65 |