Forum Discussion

ALambert's avatar
ALambert
Frequent Visitor
3 years ago
Solved

Splitting stats table based on columns from another table

I have Table A that is a list of memberships and relevant info

constituent_idmembership_idduesprogramcategorysubcategoryjoinedexpiresstandingdate_added
1879571101950DfPDA. Community Member $50 09/15/2110/04/23Active10/04/22
184600992150DfPDA. Community Member $50 04/28/2110/03/23Active10/04/22
158578940245DfPDB. Individual Professional Member $45.00 08/21/2010/03/23Active10/03/22
185639999750DfPDA. Community Member $50 08/10/2110/03/23Active10/03/22
18913711748100DfPDC. Individual Professional Member $100.00 10/03/2210/03/23Active10/03/22
180325944345DfPDB. Individual Professional Member $45.00 08/31/2009/29/23Active09/29/22
1891321174750DfPDA. Community Member $50 09/29/2209/29/23Active09/29/22
1705811542150MMDG04. Collaborating Friend 04/25/2207/19/23Active07/19/22
177236116573000MMDG08. Collaborating Partner 07/07/2207/07/23Active07/07/22
17871211655150MMDG04. Collaborating Friend 07/06/2207/06/23Active07/06/22
456011165460MMDG03. Sponsoring Friend 07/06/2207/06/23Active07/06/22
52219864040th AnniversarySeason Pass 03/30/21 Dropped11/05/21
1099849654000040th AnniversarySeason Sponsor 11/19/1511/19/16Lapsed05/25/21
15105990416040th AnniversarySeason Pass 04/20/2104/20/22Lapsed

04/20/21

 

and Table B that is a date table with some statistics about membership activity for a given day

DateYearMonthDayActive MembersTotal Members
08/06/2220228610884860
08/07/2220228710834860
08/08/2220228810834860
08/09/2220228910864863
08/10/22202281010854863
08/11/22202281110824863
08/12/22202281210814863
08/13/22202281310804863
08/14/22202281410804863
08/15/22202281510804863
08/16/22202281610804863

the stats are calculated from Table A using

 

 

Active Members = COUNTROWS(FILTER('Constituent membership', AND('Date Stats'[Date] >= 'Constituent membership'[joined], 'Date Stats'[Date] <= 'Constituent membership'[expires])))

 

 

and

 

 

Total Members = COUNTROWS(FILTER('Constituent membership', 'Constituent membership'[joined] <= 'Date Stats'[Date]))

 

 

 

The issue I'm having is that if I create chart that uses stats from Table B, but then try to split it using the membership program as a legend, I just get 2 identical lines (the correct data is not identical)

 

Is there someway for me to create a relationship between these two tables so that I can get a line for each membership program without having to create a new measure for each program?

Any advice on what to lookup here or how to go about this is greatly appreciated. Not even sure what to google.

  • Hi ALambert ,
    this looks like a typical "Events in progress"-pattern to me. You need either just one appropriate measure or a different helper table. Please check out this article: Events in progress – DAX Patterns and let me know if you have trouble implementing it to your case.

1 Reply

  • ImkeF's avatar
    ImkeF
    Community Champion

    Hi ALambert ,
    this looks like a typical "Events in progress"-pattern to me. You need either just one appropriate measure or a different helper table. Please check out this article: Events in progress – DAX Patterns and let me know if you have trouble implementing it to your case.