Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Date | ID | Period |
26/06/2022 | 39750 | 202206 |
26/06/2022 | 39951 | 202206 |
01/05/2022 | 18679 | 202205 |
22/04/2022 | 30091 | 202204 |
21/04/2022 | 28233 | 202204 |
20/04/2022 | 14501 | 202204 |
16/04/2022 | 14501 | 202204 |
14/04/2022 | 26936 | 202204 |
04/05/2022 | 13284 | 202205 |
25/05/2022 | 14501 | 202205 |
21/05/2022 | 13241 | 202205 |
Period is the filter used in the visualization.
if year & month(Period) is latest--> count with latest date and the dates 29 days before,
count(distinct id)
if year&month(period) is not the latest--> count with last date that month and the dates 29 days before,
count(distinct id)
Solved! Go to Solution.
Hi @kruthikav ,
You can create a measure as below to get it, please find the details in the attachment.
Count =
VAR _selpreiod =
SELECTEDVALUE ( 'Table'[Period] )
VAR _firstdate =
DATE ( VALUE ( LEFT ( _selpreiod, 4 ) ), VALUE ( RIGHT ( _selpreiod, 2 ) ), 1 )
RETURN
CALCULATE (
DISTINCTCOUNT ( 'Table'[ID] ),
FILTER (
'Table',
'Table'[Date]
>= EOMONTH ( _firstdate, 0 ) - 29
&& 'Table'[Date] <= EOMONTH ( _firstdate, 0 )
)
)
If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @kruthikav ,
You can create a measure as below to get it, please find the details in the attachment.
Count =
VAR _selpreiod =
SELECTEDVALUE ( 'Table'[Period] )
VAR _firstdate =
DATE ( VALUE ( LEFT ( _selpreiod, 4 ) ), VALUE ( RIGHT ( _selpreiod, 2 ) ), 1 )
RETURN
CALCULATE (
DISTINCTCOUNT ( 'Table'[ID] ),
FILTER (
'Table',
'Table'[Date]
>= EOMONTH ( _firstdate, 0 ) - 29
&& 'Table'[Date] <= EOMONTH ( _firstdate, 0 )
)
)
If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
We wnat to help but sorry, i am a volunteer helping on a Sunday (my day off)
If you cant take the effort to carefully provide the info requested then there are plenty of other people on this forum who need help who will. 😁😁
Please provide examples of your input data as a tables not screen shorts (so we can import them and build a solution).
Also provide an example of the desired output with clear description. Dont share private data.
Thank you
I have added the table. Please let me know if it helps
We want to help but it looks like you have rushed this and it does not make sense 🙁🙁.
To get a quick answer, please take more care.
Provide examples of your input data as a tables not screen shorts (so we can import them and build a solution).
Also provide an example of the desired output with clear description. Dont share private data.
Try use consistent field names in the input date, the output data and the decsription ... so we know what you mean.
Thank you 😁😁
To the above dataset.. We have provided period filter.. So based on the filter selection we need the count of ID..
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |