How to calculate usage %

WizardOz
WizardOz Contributor

This is what I have:  Content ID and Product are meta data for a full list of documents.   When an user used a document, such as download, viewed etc,  there is a record for Library ID, user role, and user region etc.  When there is no Library ID, it means the document has not been used.   Now the stake holder wants to see the document usage %, meaning how many documents were used.  I can easily get content usage % by count(distinct 'Library ID')/count(distinct`Content ID`).  

 

However, the challenge is how to calculate the content usage % when they select a  filter about user roles, user region (I have more user related variables).  Hope I explained it clear.

 

Content idproduct Library IDuser roleuser region
123A123ManagerUSA
234A234AssociateGermany
124B124ManagerUSA
235B235AssociateCanada
345A   
245C   
346B   
347C   
567B   


 

Productcontent usage(%)
A67% (=2/3)
B50% (=2/4)
C0% (=0/2)

 

 

When filter on User role - manager
Productcontent usage(%)
A33% (=1/3)
B25% (=1/4)
C0% (=0/2)

 

 

When filter on User Region - Germany
Productcontent usage(%)
A33% (=1/3)
B0% (=0/4)
C0% (=0/2)
 
 

Best Answers

  • jaeW_at_Onyx
    jaeW_at_Onyx Coach
    Answer ✓

    Gotcha covered @WizardOz ,

     

    EDIT:  updated with sound:  https://youtu.be/Xb4QgKYgaqg

     

    the short answer, you want to create a dataset with the granularity one row per user per content.   then JOIN it to the rows of actual engagement.  that way you can calculate did a user engage or not and take the ratio.

     

    this model does not use COUNT DISTINCT so will scale with data volume AND respond to filters!

    photo.PNG

     

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • jaeW_at_Onyx
    jaeW_at_Onyx Coach
    Answer ✓

    in the enumerator you only keep columns specific to engagement (in my case just libraryID b/c that's the PK for the table, userID, contentID and count_numerator.  

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"

Answers

  • jaeW_at_Onyx
    jaeW_at_Onyx Coach
    Answer ✓

    Gotcha covered @WizardOz ,

     

    EDIT:  updated with sound:  https://youtu.be/Xb4QgKYgaqg

     

    the short answer, you want to create a dataset with the granularity one row per user per content.   then JOIN it to the rows of actual engagement.  that way you can calculate did a user engage or not and take the ratio.

     

    this model does not use COUNT DISTINCT so will scale with data volume AND respond to filters!

    photo.PNG

     

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • WizardOz
    WizardOz Contributor

    Hi Jae,

     

    Wonder if it is just me - I coudl not hear anything in this youtube? I checked other youtube videos = no problem with sound.

     

    Can you check and let me know?

     

    Thank you.

  • Oh no!! Dang it.  I'll have to record it again tonight.  Sorry.

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • WizardOz
    WizardOz Contributor

    @jaeW_at_Onyx 

     

    Hi Jae,

     

    Thank you fo the video - I now understand the concept now.  I will work on the magic ETL .

     

    But here is something I wanted to understand in general - 

     

    When you create this new dataset in ETL, do you only select the fields you need or all fields from the original dataset in the numerator dataset? My original dataset has about 70 columns including some measurements.  when additional rows are added, the measurements  are also added.  So once the new dataset is ready, do you only use this new dataset to create cards for % in a dashboard,  and use the original dataset for other cards? 

     

    Thank you for your help.

     

    Olivia

     

     

     

  • jaeW_at_Onyx
    jaeW_at_Onyx Coach
    Answer ✓

    in the enumerator you only keep columns specific to engagement (in my case just libraryID b/c that's the PK for the table, userID, contentID and count_numerator.  

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"