Forum Discussion
How to count value based on another count aggregate
Hi community,
This may seem like a stupid question but I am fairly new to PowerBI so I require your aid.
I have a table with users, and their unique event_dates of logons.
I guess my task constists of two things:
1) First - the below table displays how many unique event dates I have for each individual (How many unique days I see atleast 1 login) -> which is basically count(event_date)
I need to have another table where I can aggregate the number of these emails by company, but with a specific filter with above certain days of unique days activity. So for example, in the picture above I have 5 emails, where the first one has logged in 20 different days. On a separate table I need to have the company and to be able to count emails that have logged atleast >10 times. Which should result in Company A, Email_Count : 1, since only user meets the criteria.
After this has been achieved, I want to have a dynamic filter where the user can put the treshold himself. So if he is not satisfied with >10 condition, let's say he makes it > 2 , this should return two emails in that company.
So in short, I need to count the event dates for each individual, then count the individuals that meet certain amount of count event dates, and then filter by the count of event_dates so it can be flexible.
Is that possible? Thanks!
- Anonymous3 years ago
Hi Anonymous ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Best Regards
2 Replies
- some_bihCommunity Champion
Hi Anonymous to create separate table with filter you want you should create calculated table as example shown on link. In that newly created table you can filter your "counting" and created calculated columns as you wish. Hope this help
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-tables
- AnonymousNot applicable
Hi Anonymous ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Best Regards