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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
HSmith
Regular Visitor

Continued Declining Spend across multiple Months

Hi,

 

I am trying to build a report which brings forward information about customers who we have continued to see a decline in spend each month for 3-4 months so that this can be used as a flag to see if customers are at risk of being lost. 

 

I'd like this to be able to filter out those who do not fulfill this requirement and then be able to drill down into detailed information for those who this does apply to.

 

Not real data below (this would link to multiple tables based on invoice number / date / measures etc) and in this example it would only pull forward ABC and BCD:

Invoice numberAccount CodeRevenueDate
1ABC4001/01/2016
4ABC3005/02/2016
8ABC2009/03/2016
11ABC1018/04/2016
2BCD8001/01/2016
5BCD4003/02/2016
6BCD2005/02/2016
9BCD5009/03/2016
12BCD2018/04/2016
3CDE5001/01/2016
7CDE6005/02/2016
10CDE7009/03/2016
13CDE6018/04/2016

 

 

Any help much appreciated,

 

Holly

 

 

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @HSmith,

 

Have you achieved your requirement with my original advice? If so, please kindly mark the corresponding reply as an answer so that others having similar concern can find the solution more easily. If you still have any question, please feel free to ask. Thanks for your understanding.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @HSmith,

 

Suppose you want to use a Table visual to display data records. Please see below steps in my test.

 

Based on the sample table you provided, I created serveral calculated columns.

Month =
Sheet1[Date].[MonthNo]

Total revenue for each month =
CALCULATE (
    SUM ( Sheet1[Revenue] ),
    ALLEXCEPT ( Sheet1, Sheet1[Account Code], Sheet1[Date].[Month] )
)

Total revenue last month =
LOOKUPVALUE (
    Sheet1[Total revenue for each month],
    Sheet1[Account Code], Sheet1[Account Code],
    Sheet1[Month], Sheet1[Month] - 1
)

Flag1 =
IF (
    Sheet1[Month] = 1,
    BLANK (),
    IF (
        LOOKUPVALUE (
            Sheet1[Total revenue for each month],
            Sheet1[Account Code], Sheet1[Account Code],
            Sheet1[Month], Sheet1[Month] - 1
        )
            > CALCULATE (
                SUM ( Sheet1[Revenue] ),
                ALLEXCEPT ( Sheet1, Sheet1[Account Code], Sheet1[Date].[Month] )
            ),
        0,
        1
    )
)

Whether Continued Declining =
IF (
    CALCULATE ( SUM ( Sheet1[Flag1] ), ALLEXCEPT ( Sheet1, Sheet1[Account Code] ) )
        = 0,
    "Yes",
    "No"
)

1.PNG

 

Then, I could use column [Whether Continued Declining] as a flag to filter those customers are at risk of being lost.

2.PNG

For your another requirement that drill down into detailed information, I'am afraid currently it is not a supported functionality in Power BI desktop.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors