Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
)
)
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |