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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
koorosh
Post Partisan
Post Partisan

how many values per months

Hello All,

 

There is a table with the following columns:

users, courses, course date, login date

koorosh_0-1646947417117.png

Need a table to show users with their "number of courses per month" and "number of login per month".

Thanks . 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @koorosh,

I think you need to use a date table that is not linked to current table records. Then you can use the current user's fields on row fields, data table field with year and month hierarchy on column fields.
After these steps, you can write two measure formulas to calculate the different calculations based on the current category group and use them on value fields.

number of courses per month =
CALCULATE (
    COUNTA ( Table[courses] ),
    FILTER ( ALLSELECTED ( Table ), [course Date] IN VALUES ( Date[Date] ) ),
    VALUES ( Table[Users] )
)

number of login per month =
CALCULATE (
    COUNT ( Table[login Date] ),
    FILTER ( ALLSELECTED ( Table ), [login Date] IN VALUES ( Date[Date] ) ),
    VALUES ( Table[Users] )
)

Regards,

Xiaoxin Sheng

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

HI @koorosh,

I think you need to use a date table that is not linked to current table records. Then you can use the current user's fields on row fields, data table field with year and month hierarchy on column fields.
After these steps, you can write two measure formulas to calculate the different calculations based on the current category group and use them on value fields.

number of courses per month =
CALCULATE (
    COUNTA ( Table[courses] ),
    FILTER ( ALLSELECTED ( Table ), [course Date] IN VALUES ( Date[Date] ) ),
    VALUES ( Table[Users] )
)

number of login per month =
CALCULATE (
    COUNT ( Table[login Date] ),
    FILTER ( ALLSELECTED ( Table ), [login Date] IN VALUES ( Date[Date] ) ),
    VALUES ( Table[Users] )
)

Regards,

Xiaoxin Sheng

vojtechsima
Super User
Super User

Hi, @koorosh ,
Something like this?
Creating matrix, putting months as columns, User as rows, count of login and course date as Values:

vojtechsima_0-1646949634867.pngvojtechsima_1-1646949643918.png

 






Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.

Hello and Thanks,

The months for login dates have not been shown in the matrix.

koorosh_0-1646980764266.png

koorosh_1-1646980862777.png

 

koorosh_0-1646986712251.pngkoorosh_1-1646986746146.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.