Forum Discussion
Simple count certain values within measure
- 4 years ago
Hi,
Thank you for the link.
Could you please try the below for calculating "appeared once" ?
Users count who have one in grand total measure 02: = COUNTROWS ( FILTER ( ADDCOLUMNS ( SUMMARIZE ( Data02, Data02[Date], Data02[Name] ), "@count", CALCULATE ( SUMX ( Data02, 1 ) ) ), [@count] = 1 ) )Please also check the attached pbix file.
Hi JiHwan 안녕하세요 지환님
Thanks for your prompt reply.
It does count some but appears that counts much less than expected.
I wonder if it has anything to do with my actual dataset that has a time column where multiple users may appear multiple times on any given date.
Hi,
Thank you for your feedback.
Please share your sample pbix file's link that contains another dataset, with how the expected outcomes show.
And then, I can try to look into it to come up with a more accurate solution.
Thanks.
- Anonymous4 years agoNot applicable
Hi Jihwan,
Here's the sample PBIX file that contains another dataset:
https://1drv.ms/u/s!AjGre1-z2o5NgaVGXIJsJpsPjxirgQ?e=L5U1aSI am looking to count unique users per day so I can calculate how many users appeared once, twice, three times etc (0-7) from the daily unique user count weekly.
- Jihwan_Kim4 years ago
Super User
Hi,
Thank you for the link.
Could you please try the below for calculating "appeared once" ?
Users count who have one in grand total measure 02: = COUNTROWS ( FILTER ( ADDCOLUMNS ( SUMMARIZE ( Data02, Data02[Date], Data02[Name] ), "@count", CALCULATE ( SUMX ( Data02, 1 ) ) ), [@count] = 1 ) )Please also check the attached pbix file.
- Anonymous4 years agoNot applicable
First of all, thanks again for the updated pbix file.
The revised result is showing 17
(14 users with "1" makes up 14 and 1 user with "3" = 17)
however, how do we count only the users with "1" to get 14.