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.
Dear All,
I am trying to count user wise distinct date but not able to do. I have datetime columns so my measure is not giving correct counts because of time in the date.
Solved! Go to Solution.
@Anonymous - Really difficult without the source data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
But, maybe count all of your rows of users and subtract this count? Just purely guessing at this point due to lack of information.
You could try:
Team Working Days = CALCULATE(DISTINCTCOUNT(Activity_Detail[Activity_Insert_At]), ALLSELECTED(Activity_Detail[Activity_Insert_At]))
Team Working Days =
VAR __Table =
ADDCOLUMNS(
ALLSELECTED(Activity_Detail[Activity_Insert_At]),
"Date Only",INT(Activity_Detail[Activity_Insert_At])
)
RETURN
COUNTROWS(DISTINCT(SELECTCOLUMNS(__Table,"Date",[Date Only])))
@amitchandak @Greg_Deckler thanks for ur help,
@Greg_Deckler - after using your measure , now 85 counts showing for all users -
@Anonymous - Is Activity_Insert_At your date/time column? Maybe just:
Team Working Days =
VAR __Table =
ADDCOLUMNS(
Activity_Detail[Activity_Insert_At],
"Date Only",INT(Activity_Detail[Activity_Insert_At])
)
RETURN
COUNTROWS(DISTINCT(SELECTCOLUMNS(__Table,"Date",[Date Only])))
If not, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Dear @Greg_Deckler ,
Now counts are coming perfectly fine. But it is coming for users who have done activity.
I need those users details also who have not done any activity with "0" count.?
Kindly suggest me on this also. 🙂
Thanks Again for your help.
@Anonymous - Really difficult without the source data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
But, maybe count all of your rows of users and subtract this count? Just purely guessing at this point due to lack of information.
Thanks for guideing me to raise a better complaint. Next time i will take care of it.
By the way, After adding "0" i the end , I am getting those users also who have not done any activity in the selected date range -
Thanks for helping me out in the same.
@Anonymous , I doubt you Activity_Insert_At has timestamp , Change the format to include timestamp and check
Create a date and use
Activity_Insert_Date = [Activity_Insert_At].Date
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |