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
Jtischler
Helper I
Helper I

YOY Usage in Line graph, Trend line is right, but %age is not

We launched a new platform last year, and I want to show a line graph showing the % of users who used it each month.

 

I have 2 tables one with all user information and one with usage information

 

This counts active users in a given month from User Table:

 

MonthlyActUserCnt = CALCULATE (
    COUNT ( 'UserData'[User unique ID] ),
    FILTER ( ALL ( 'UserData' ), [Termination Date] = BLANK () )
)
    + CALCULATE (
        COUNT ( 'UserData'[User Unique Id] ),
        FILTER (
            ALL ( 'UserData' ),
            [Hire / Start Date] >= MIN ( 'DateTable'[Date] )
                && [Termination date] <= MAX ( 'DateTable'[Date] )
                && [Termination date] <> BLANK ()
                && [Hire / Start Date] <> BLANK()
        )
    )

 

This counts monthly users from Dashboard Table:

CntUnqEnroll = DISTINCTCOUNT('New Dashboard'[User unique ID])
 
This gets the usage%:
%Usage = Divide([CntUnqEnroll],[MonthlyActUserCnt])
 
In individual tables each count reflects the right numbers, but in the line graph the % shown is incorrect for the numbers being used.
 
Jtischler_0-1682620808825.pngJtischler_1-1682620829007.pngJtischler_2-1682620920404.png

For instance March 2023 should be 43% not 33%

 

I have a date table that I created off of dates in the user table, and I am using the date heirarchy month and year from the date table in the MonthlyUserCount:

 

DateTable = CALENDAR(Min(UserData[Hire / Start Date]),TODAY())

 

Jtischler_0-1682623554273.png

 

The New Dashboard table has subscription dates with Month and year heirarchy, and thats what is being used as the filters on the Other table

Jtischler_1-1682623670082.png

 

 In the Data Model, the date table is not linked to anything.

 

I feel I am missing something here.....

I need to say for these given years and months show me the usage % but I can't figure out the right combination of fields and metrics to get this to populate right
 
What do I need to do?

 

1 REPLY 1
MFelix
Super User
Super User

Hi @Jtischler ,

 

Not really sure how you have your model setup but seems to be a discrepancy between the dates since the date table is a separate table from the model when you try and make the calculations based on it without any relationship the values get a different context so a different result.

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.