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
adealboran777
Frequent Visitor

Date and Two Table

Hi!

 

Let's see if somebody knows how to do this.

 

I have two tables:

 

  1. The first one records several interactions with an app, which can be of Type A or B, during a period of time.
    1. Date.
    2. InteractionID.
    3. UserID
    4. Interaction --> A or B.
  2. The second one has a list of users with the following fields:
    1. UserID.
    2. Centercost --> 1 or 2.

My objective is to get a chart with an X-axis showing the number of interactions type A achieved (up to 😎 and a Y-axis showing the number of UserID that achieved such number of interactions type A. Also, it needs to be filtered by the variable Date (time).

 

So, I need something that counts the number of interactions per user and afterwards something that counts the number of users with a given number of interacions.

 

How would you do it? I have tried different approaches but I am not able to do it. For instance, I have tried to count the number of interacions type A done using a new column on the second table, but it doesn't take into account the Date when using a filter. 

 

Thanks in advance!

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

So this is going to basically look like:

 

Interactions Measure = 
COUNTROWS(FILTER('InteractionsTable',[Interaction]="A"))


Users Above Threshold Measure = 
COUNTROWS(
    FILTER(
        SUMMARIZE('UserTable',[UserID],"__Interactions",[Interactions Measure]),
        [__Interactions] >= 5
    )
)

For users with 5 or more interactions.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

So this is going to basically look like:

 

Interactions Measure = 
COUNTROWS(FILTER('InteractionsTable',[Interaction]="A"))


Users Above Threshold Measure = 
COUNTROWS(
    FILTER(
        SUMMARIZE('UserTable',[UserID],"__Interactions",[Interactions Measure]),
        [__Interactions] >= 5
    )
)

For users with 5 or more interactions.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you!

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.