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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
AllanBerces
Post Patron
Post Patron

Sum - Calculated Column

Hi good day,

Can anyone help me on my calculated column on how to arrived on my desired outcome.

Current Table

AllanBerces_1-1723367882173.png

 

Desired Outcome adding calculated column

AllanBerces_2-1723367911207.png

 

Thank you

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below (the picture and the attached pbix file).

 

Jihwan_Kim_0-1723368846027.png

 

 

desired outcome CC = 
SUMX (
    FILTER (
        SUMMARIZECOLUMNS (
            data[date],
            data[location],
            data[trade],
            data[week_no],
            data[count]
        ),
        data[date] = EARLIER ( data[date] )
            && data[location] = EARLIER ( data[location] )
    ),
    data[count]
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below (the picture and the attached pbix file).

 

Jihwan_Kim_0-1723368846027.png

 

 

desired outcome CC = 
SUMX (
    FILTER (
        SUMMARIZECOLUMNS (
            data[date],
            data[location],
            data[trade],
            data[week_no],
            data[count]
        ),
        data[date] = EARLIER ( data[date] )
            && data[location] = EARLIER ( data[location] )
    ),
    data[count]
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

HI @Jihwan_Kim if you dont mine how can i chage the solution in to Measure.

 

Thank you

Hi @Jihwan_Kim Thank you very much you save my day.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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