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
orihait
Helper I
Helper I

Revenue over last 3 months

hi guys,

got a questions for you.

i have a revenue table and a dim date table, both are connected.

rev table looks something like this :

client|date|revenue

i want to know which client hasnt made a transaction over the last 3 months buy cant find the correct syntax.

hopefully someone can help 🙂

thanks!!!

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @orihait 

 

Try the below Measure or the attached file.

Measure = 
VAR __clientWithSales =
    CALCULATETABLE(
        VALUES( 'Table'[client] ),
        DATESINPERIOD( 'calendar'[Date], TODAY(), -3, MONTH )
    )
RETURN 
COUNTROWS(
    EXCEPT( 
        VALUES( 'Table'[client] ),
        __clientWithSales
    )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Try something like this

Rolling 3 = CALCULATE(sum(Table[Revenue]),DATESINPERIOD('Date'[Date Filer],MAX(Table[Date]),-3,MONTH)) +0

 

and use with show rows with no on client

ShowItemwithoutdata.JPG

Mariusz
Community Champion
Community Champion

Hi @orihait 

 

Try the below Measure or the attached file.

Measure = 
VAR __clientWithSales =
    CALCULATETABLE(
        VALUES( 'Table'[client] ),
        DATESINPERIOD( 'calendar'[Date], TODAY(), -3, MONTH )
    )
RETURN 
COUNTROWS(
    EXCEPT( 
        VALUES( 'Table'[client] ),
        __clientWithSales
    )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

thank you so much 🙂

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.