Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All!
I need help with calculating the number of customers based on the same number of Customer Lifetime Months. Basically, I need to create a bar chart that will show how many customers we have who stayed with us for 47, 46, etc months. Customer Lifetime Months is the measure I've created. Any help is appreciated
Solved! Go to Solution.
Hi,
I tried to create a sample pbix file like below.
One of ways to achieve this is to create an axis table something like below.
Please check the below picture and the attached pbix file.
Customers count by Lifetime measure: =
VAR _axis =
    MAX ( 'Axis table'[Lifetime Measure result] )
RETURN
    COUNTROWS (
        FILTER (
            ADDCOLUMNS (
                DISTINCT ( Data[Customer] ),
                "@lifetimemeasure", [Lifetime measure:]
            ),
            [@lifetimemeasure] = _axis
        )
    )
Hi,
I tried to create a sample pbix file like below.
One of ways to achieve this is to create an axis table something like below.
Please check the below picture and the attached pbix file.
Customers count by Lifetime measure: =
VAR _axis =
    MAX ( 'Axis table'[Lifetime Measure result] )
RETURN
    COUNTROWS (
        FILTER (
            ADDCOLUMNS (
                DISTINCT ( Data[Customer] ),
                "@lifetimemeasure", [Lifetime measure:]
            ),
            [@lifetimemeasure] = _axis
        )
    )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
            | User | Count | 
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | 
| User | Count | 
|---|---|
| 24 | |
| 11 | |
| 10 | |
| 9 | |
| 8 |