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

Basket Analysis

Hello i have a table that has a membership rate purchased by a contact and has a monthly date if the contact has a membership for the countdate.

 

 

ContactIDCountdateRatename
11/15/2022Ind. Membership
12/15/2022Ind Membership
13/15/2022Deluxe Membership
21/15/2022Ind. Membership
22/15/2022Ind. Membership
23/15/2022Gold Membership

 

question would there be a way to find the count/percentages of the combinations? For example the output would look like the table below

 

 Deluxe MembershipGold Membership
Ind. Membership50%50%
1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @OpenMike13 

 

Is "Ind. Membership" a type of membership as it is based in the Ratename column?

 

I've put together a PBIX with a few mods that align with the table in your post but just unsure if it's what you were wanting.

 

Let us know if it's not! 🙂

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

6 REPLIES 6
v-yanjiang-msft
Community Support
Community Support

Hi @OpenMike13 ,

In my understanding, you want to get the ratio of the IDs owned by each membership on the last date to the total IDs. Is this your expected result:

vkalyjmsft_0-1659344696540.png

Here's my solution, create a measure:

Count =
VAR _Num =
    COUNTROWS (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Countdate]
                = MAXX (
                    FILTER ( ALL ( 'Table' ), 'Table'[ContactID] = EARLIER ( 'Table'[ContactID] ) ),
                    'Table'[Countdate]
                )
                && 'Table'[Ratename] = MAX ( 'Table'[Ratename] )
        )
    )
VAR _TotalNum =
    CALCULATE ( DISTINCTCOUNT ( 'Table'[ContactID] ), ALL ( 'Table' ) )
RETURN
    DIVIDE ( _Num, _TotalNum )

Put the Ratename and the measure in a matrix, get the result.

vkalyjmsft_1-1659345106488.png

 

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

TheoC
Super User
Super User

Hi @OpenMike13 

 

Is "Ind. Membership" a type of membership as it is based in the Ratename column?

 

I've put together a PBIX with a few mods that align with the table in your post but just unsure if it's what you were wanting.

 

Let us know if it's not! 🙂

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thanks for the quick response.

 

Ind. Membership is a type of membership but its a basic membership the gold and deluxe are upgraded memberships. I see you added a column to parse out the deluxe and gold. Would this be the route to go to find what tier they upgraded to from the original 'Ind. Membership'?

Hi @OpenMike13 

 

To be honest, I only did that because that is what I saw in your requirement to get the output you needed. However, it would very much achieve exactly what you've raised as well (i.e. upgraded memberships).

 

Hope that helps 🙂

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

What would be the best way to do that? 

Hi @OpenMike13, as I've done for you is completely fine.  It provides you with the ability to use the original column for memberships but also the updated.  It's already been done in PowerQuery so there's no code needed in Power BIs front end.  

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

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.