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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
XuanHau
Helper I
Helper I

Login frequency group and users count

Hi guys,

I have 2 tables: one for the history log (table below) and the other for the Date table. These 2 tables have a relationship via the Date column.

AccountDate Type
A10/05/2024active
A27/06/2024active
A28/06/2024active
A28/06/2024locked
B15/06/2024active
C19/06/2024active
C20/06/2024active
D19/06/2024active
D20/06/2024active

I want to create a page with a Date slicer to filter data and a chart like this:

When choosing a date slicer, we will group the users who have the same number of login dates and count how many accuounts are in the same group and type.

For example, based on the data above, In June we have:

  • 3 accounts (A, C, D) have logged in 2 times with the type "active"
  • 1 account (A) has logged in one time with the type "locked"
  • 1 account (B) has logged in one time with the type "active"

chartchart

How can I create this kind of chart? 

Any help is much appreciated!

Thank you in advance!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@XuanHau , You need dynamic segmentation on measure

 

refer

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1719645179730.png

 


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

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1719645179730.png

 


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

Hi @Ashish_Mathur

I used your suggestion to test with my data as well, and it works.

I very appreciate your help! 

You are welcome.


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

Hi @XuanHau ,

 

In addition to @amitchandak 's technical recommendations, there are also other ways to achive your required output, like for example, just utilizing calculated columns.  

You can create calculated columns like below:

DataNinja777_0-1719637805053.png

And then, you can create a measure like below from the calculated column above:

Distinctcount = DISTINCTCOUNT('Table'[What to count])

 

For the x-axis (field of number of times), you can also create a calculated column like below.

DataNinja777_2-1719638233371.png

 

And put that on the stacked column chart to produce the same output you required.  

DataNinja777_1-1719637959097.png

 

I attach a pbix file as an example.

@DataNinja777I also tried the way you suggested, but it works only if we use the slicer for one month. If we use multiple months or a date slicer, the results might not work well. I found another way to create the chart. Anyway, thank you for your ideas and help 👍

amitchandak
Super User
Super User

@XuanHau , You need dynamic segmentation on measure

 

refer

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandakThat's a good video. After following your guide, it's actually quite technically complicated for me, but finally, I can create the chart I want. Thank you so much for your help!

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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