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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
RichOB
Post Partisan
Post Partisan

Rookie Measure Question

Hi, if the table below is my dataset and I want to find how many customers purchased just a bike, what measure will show me that there were 4 bikes sold in April, please?

 

DateCustomerItem
01/04/20241Bike
01/04/20242Bike
01/04/20243Bike, Helmet, Gloves
01/04/20244Helmet
01/04/20245Bike, Helmet, Shoes, Gloves


Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from Kedar_Pande, please allow me to provide another insight.
Hi @RichOB ,

Please try the following measure.

 

Number of bikes sold in April = 
COUNTX (
    FILTER (
        'Table',
        CONTAINSSTRING ( 'Table'[Item], "Bike" )
            && MONTH ( 'Table'[Date] ) = 4
    ),
    'Table'[Customer]
)

 

vdengllimsft_0-1729478092253.png

 


Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

My suggestion is to split the second column by rows in the Power Query Editor.  Thereafter, jsut write this measure

Measure = distinctcount(Data[Customer])

Hope this helps.


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

Thanks for the reply from Kedar_Pande, please allow me to provide another insight.
Hi @RichOB ,

Please try the following measure.

 

Number of bikes sold in April = 
COUNTX (
    FILTER (
        'Table',
        CONTAINSSTRING ( 'Table'[Item], "Bike" )
            && MONTH ( 'Table'[Date] ) = 4
    ),
    'Table'[Customer]
)

 

vdengllimsft_0-1729478092253.png

 


Please see the attached pbix for reference.

Best Regards,
Dengliang Li

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

Kedar_Pande
Super User
Super User

@RichOB 

To calculate how many customers purchased just a bike in April from your dataset

JustBikeSales = 
CALCULATE(
COUNTROWS('Table'),
'Table'[Item] = "Bike",
MONTH('Table'[Date]) = 4
)

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.