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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Brjt1
Frequent Visitor

Keep returning text in my visualization rows

Hi,

 

I keep pulling up text in my matrix for this dax measure Average Spend =
VAR CohortStartMonth = SELECTEDVALUE('AR Invoice'[Cohort])
VAR CurrentMonth = EOMONTH(CohortStartMonth, SELECTEDVALUE('(customer) Period Out'[Value]))
VAR TransactionsInCohortPeriod =
FILTER(
'AR Invoice',
RELATED('Rolling Calendar'[End of Month]) = CurrentMonth
)
VAR Invoices =
SUMMARIZE(
TransactionsInCohortPeriod,
'AR Invoice'[invoice_id],
"Invoice Total", SUM('AR Invoice'[invoice_amount])
)
RETURN
AVERAGEX(Invoices, [Invoice Total])  I am also using a 

(customer) Period Out = GENERATESERIES(0,DISTINCTCOUNT('Rolling Calendar'[End of Month])-1) in a column and AR invoice dates hope someone can help me figure out the problem. I'm also using a slicer 
(customer) Measure Selection =
DATATABLE(
    "Measure Name", STRING,
    "Sort", INTEGER,
    {
        {"Customers", 1},
        {"Customers Retained", 2},
        {"Average Spend", 3}
    })
4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

What exactly are you trying to do?  Share some data, explain the question in simple language and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


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

Hi @Brjt1 ,

 

Thanks amitchandak  for the quick reply. Allow me to suggest other ideas:
Have you tried creating the measures separately to see if the output is correct? Such as:

_a =
DISTINCTCOUNT ( 'AR Invoice'[customer_id] )
_b=
        CALCULATE (
            DISTINCTCOUNT ( 'AR Invoice'[customer_id] ),
            ALLSELECTED ( 'Customer Age Bucket' ),
            'Customer Age Bucket'[Age] = 1
        )
_c =
DIVIDE (_a,_b)
Retain % =
CALCULATE (_c,
    'Customer Age Bucket'[Age] > 1
)

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

amitchandak
Super User
Super User

@Brjt1 , if you are looking for Cohort analysis refer

 

https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-3-Period-Of-Stay-Cohort-Anal...

Power BI Cohort Analysis, Customer Retention %- https://youtu.be/qY1SDF1cwsg

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amitchandak,

I implemented your retention solution instead and it works great but I have a question. My results are showing 100% everywhere and I'm not sure where I went wrong. I am pulling from my ar invoice table the customer id's 

Brjt1_0-1724341177710.png

 

Preview
Retain % = CALCULATE(divide(DISTINCTCOUNT('AR Invoice'[customer_id]),CALCULATE(DISTINCTCOUNT('AR Invoice'[customer_id]),ALLSELECTED('Customer Age Bucket') , 'Customer Age Bucket'[Age] =1)) , 'Customer Age Bucket'[Age] >1)  Where do you think I went wrong?
 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.