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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Tim_Walker
Regular Visitor

Value of New Sales this year

Hi, I want to find the value of sales to new clients this year.  My table is Client Name, Invoice Date and Amount and the dates are spread over 2 fiscal years.  I simply need a measure (not a standalone table with filters) that I can add to a table showing the value of clients billed in Year 2 but not in year 1, but most importantly provides a total that I can use.  I have produced a number of measures which appear to give me the list, but none are able to produce a total.  Any help much appreciated...

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Tim_Walker,

 

Sum sales =
IF (
    CALCULATE (
        COUNTROWS ( data ),
        FILTER (
            ALLEXCEPT ( data, data[Client Name] ),
            data[Invoice Date].[Year] < YEAR ( TODAY () )
        )
    )
        < 1,
    CALCULATE ( SUM ( data[Amount] ), ALLEXCEPT ( data, data[Client Name] ) ),
    BLANK ()
)

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.

View solution in original post

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Tim_Walker,

 

Sum sales =
IF (
    CALCULATE (
        COUNTROWS ( data ),
        FILTER (
            ALLEXCEPT ( data, data[Client Name] ),
            data[Invoice Date].[Year] < YEAR ( TODAY () )
        )
    )
        < 1,
    CALCULATE ( SUM ( data[Amount] ), ALLEXCEPT ( data, data[Client Name] ) ),
    BLANK ()
)

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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