I am trying to get some help here for my dashboard. Thank you for anyone who will help in advance!
we are trying to track the % of user on a plaftform for each department, month by month.
The logic :
sum of the active user of specific department of given month / sum of the active user for the given month
the example will be for accounting investment department active user % for Nov 2022 will be 50/399.
1. 720 Cnt active user is a measure I created. ( logic: calculate( distinctcount(memberID), Logon='1')
2. highlighted 50 is also from cnt active user column, broken down by department.
3. my goal is to create a line chart to show the % active user of each different department month by month
You can try to use the following measure formula on the table visual with year month as category to get correspond percentage:
formual = DIVIDE ( CALCULATE ( COUNT ( Table[department] ), ALLSELECTED ( Table ), VALUES ( Table[Date] ) ), CALCULATE ( [Cnt active users], ALLSELECTED ( Table ), VALUES ( Table[Date] ) ) )
Thank you for the quick response, I have tried the DAX you have provide above, somhow the values are not correct. This is what I have found.
CALCULATE ( [Cnt active users], ALLSELECTED ( Table ), VALUES ( Table[Date] ) )
is correct, it returns all the active user count for the given month.
CALCULATE ( COUNT ( Table[department] ), ALLSELECTED ( Table ), VALUES ( Table[Date] ) )
seems counting the total number of the department of the given month, it returns large numbers as below:
For 'performance' department, 2023- Feb. The 'Cnt active users' =18.
The value returned should be 18/ 412=4.37%
Three values we need for the calculation are 'Date', 'Cnt active user', 'department' becasue it shows the right numbe when I put these three columns in the view. I just dont know what synatx should I use to return the right value. Thank you for your help in advance!
Can you please share some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Thank you! Please find the dummy data as attached below.
1. count: distinct count of active flag=1
2. logic: numerator =5 (count of active user for performance of given month)
denominator= 8 ( total count of the active user for the given month)
Find out more about the May 2023 update.
Share your Data Story with the Community in the Data Stories Gallery.