Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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?
| Date | Customer | Item |
| 01/04/2024 | 1 | Bike |
| 01/04/2024 | 2 | Bike |
| 01/04/2024 | 3 | Bike, Helmet, Gloves |
| 01/04/2024 | 4 | Helmet |
| 01/04/2024 | 5 | Bike, Helmet, Shoes, Gloves |
Thanks
Solved! Go to Solution.
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]
)
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.
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.
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]
)
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.
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 34 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 65 | |
| 44 | |
| 30 | |
| 29 |