Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
Please issue sample of my data set, My data is large data below i am showing sample
| Client Name | Case created date | case no | type |
| a | 22/08/2019 | 222 | x |
| a | 22/08/2019 | 223 | x |
| a | 21/08/2019 | 224 | x |
| b | 20/07/2019 | 225 | y |
| b | 19/07/2019 | 226 | y |
| b | 15/07/2019 | 227 | y |
| b | 14/07/2019 | 228 | z |
| c | 13/05/2019 | 223 | z |
| c | 16/05/2019 | 229 | z |
| c | 17/04/2019 | 230 | z |
| c | 13/03/2019 | 231 | x |
| c | 12/2/2019 | 232 | x |
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 | |||
| July | Aug | ||
| X | 16 | 15 | ( cases received in last three months) |
| Y | 17 | 14 | |
| Z | 18 | 12 |
Solved! Go to Solution.
Hi @Anonymous ,
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
Hi @Anonymous ,
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
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...
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |