Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
lmat
Frequent Visitor

Creating a count measure with OR

Hi,

 

I am new to PowerBI and am working on a dashboard a previously colleague made. There is one measure I am unsure if working as intended. I would like to count all the users who have been in a feature more than five times meaning they can go in any of them as long as they do so at least five times, rather than going in each one five times.

 

Does the following show me data for action card or drug or video and so on, or is it counting that they have to go on each one at least five times? I ask because when making a graph showing feature use I see the same number of users for each feature which I wouldn't expect. Thank you!

 

EngagedUsers = CALCULATE(COUNTROWS(FILTER(SUMMARIZE(VALUES('edw FactUsage'[AppId]),[AppId],"ABCD",[UniqueSessionsCount]),[ABCD]>5)),'edw DimFeature'[FeatureName] in {"Action Cards","Drug List","klpAnswer","klpResult","klpStart","Practical Procedures","Video Chapter","videoFull"})
 
8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

It will help if you share a dataset, describe the business question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@amitchandak  Thanks again - that now yields the same reasult as the original. Maybe it is correct, it's just odd that all the features show the same number of users.

 

@Ashish_Mathur Of course, sorry I didn't think to before. I have an app which has various features (action cards, drugs, etc) and would like understand which of the users of the app use the features rather than just looking at the menu lists. The initial level is to identify unique users who use any of the features five or more times seperate occasions (defined by sessionIDs), it doesn't have to be all of them five or more times.

 

The top 1000 rows of data is attached. I have changed the AppID to the UserInfo_key in this instance.

https://1drv.ms/x/s!AgJh1bpBixlmigPWD8ArNWbHLR3g?e=j9JUx1

 

I would expect to see the number from content uses to engaged users decline, but  I would also expect the feature use to vary. When I make a bar graph to look at distribution of features use by engaged users all features show the same number. 

Dashboard snapshot.JPG

 

 

 

 

Hi,

I cannot understand your question.  Based on the Excel file that you have shared, in another worksheet of that file, show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

I think filter should also be moved inside summarize , other than > 5

,'edw DimFeature'[FeatureName] in {"Action Cards","Drug List","klpAnswer","klpResult","klpStart","Practical Procedures","Video Chapter","videoFull"}

Thank you @amitchandak. I am so new to PowerBI I don't fully understand where I move filter to inside summarise - please can you explain? Thanks!

Try

 
 EngagedUsers = CALCULATE(COUNTROWS(FILTER(SUMMARIZE(filter('edw FactUsage','edw DimFeature'[FeatureName] in {"Action Cards","Drug List","klpAnswer","klpResult","klpStart","Practical Procedures","Video Chapter","videoFull"}),[AppId],"ABCD",[UniqueSessionsCount]),[ABCD]>5)))

Unfortunately it doesn't work. I end up with :

 

Engagement DAX error.JPG

 

Try like

EngagedUsers = CALCULATE(COUNTROWS(FILTER(SUMMARIZE(calculatetable('edw FactUsage','edw DimFeature'[FeatureName] in {"Action Cards","Drug List","klpAnswer","klpResult","klpStart","Practical Procedures","Video Chapter","videoFull"}),[AppId],"ABCD",[UniqueSessionsCount]),[ABCD]>5)))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.