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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Find the Highest Potential Customer

Hi,

 

    I'm trying to find the most valueable customer who is lost. 

 

For example, I'm caluculating the Lost Customer using the below dax.

 

IF([Last Booking Day Duration]>180,1,0). So if a customer has not placed for the past 180 days will be considered as a lost customer. Now I want to get the name of the customer who was giving highest revenue out of that lost customer list.
 
Thanks in advance.
4 REPLIES 4
Anonymous
Not applicable

@Anonymous

What happens if there is more than 1 customer that satisfies the condition?
AlB
Super User
Super User

Hi @Anonymous 

Please always show a sample of youra data. Otherwise we have to invent names of columns, make assumptions, ask questions and it's an unnecessary waste of everybody's time.

You can create a measure and place it in a card visual. Along the lines of:

HighestPotentialName =
VAR highestRevenue_ =
    CALCULATE ( MAX ( Table1[Revenue] ), Table1[Last Booking Day Duration] > 180 )
RETURN
    CALCULATE (
        DISTINCT ( Table1[Name] ),
        Table[Revenue] = highestRevenue_,
        Table1[Last Booking Day Duration] > 180
    )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Anonymous
Not applicable

@AlB 

Your formula has the potential to return an error if there is more than 1 customer with the same characteristics.

@Anonymous 

Yeah, that's by design. So that the user is alerted if that is the case. They can then decide how to deal with those cases.

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors