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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Sum Columns up (Quarterwise)

Hello all

 

In the picture below, i have 4 columns that display the 4 quarters of the year.

 

1.PNG

Now, i need Q2 to be the Sum of Q1 and Q2. Q3 = Q1+Q2+Q3 and same for Q4.

So Q4 would be 2'361'693.

Can i do that with a measure?

Any ideas?

 

Best regards 

1 ACCEPTED SOLUTION

@Anonymous

 

Please change the formula to this one:

 

Cumulative_Actual = 
CALCULATE (
        SUM ( Sheet1[Value] ),
        FILTER (
            ALLEXCEPT( Sheet1, Sheet1[frango]),
            Sheet1[Quarter] <= MAX ( Sheet1[Quarter] )
        )
    )

Aslo you can see the formula in this workspace

View solution in original post

10 REPLIES 10
themistoklis
Community Champion
Community Champion

@Anonymous

 

Can you try the following:

 

Cumulative_Actual = 
CALCULATE (
    SUM ( Sheet1[Values] ),
    FILTER( ALL (Sheet1 ),
    Sheet1[Quarter] <= MAX( Sheet1[Quarter] ))
)

 

Anonymous
Not applicable

@themistoklis

 

Thanks for the quick response.

I did not get it to work.

 

I think further infos are needed.

Matrix looks like:

1.PNG

 

With the fields:

2.PNG

 

Measure regarding your answer:

Cumulative_Actual = 
CALCULATE (
    SUM(Alles[Media Net exkl. WZ]) + SUM(Alles[Posting Net]);
    FILTER(ALL (Alles[Quartal]);
    Alles[Quartal] <= MAX(Alles[Quartal]))
)

"Alles" is the table. Its only one table with all the infos in there.

 

I inserted tte result measure as column instead of "Quartal".

What are my wrong thoughts?

Remove Quartal which is right after All.

 

New formual attached:

 

Cumulative_Actual = 
CALCULATE (
    SUM(Alles[Media Net exkl. WZ]) + SUM(Alles[Posting Net]);
    FILTER(ALL (Alles);
    Alles[Quartal] <= MAX(Alles[Quartal]))
)

 

Anonymous
Not applicable

Already edited it that way (Because you edited your first answer)

Its missing the "Frango" Column, it should be considered somehow.

The result i get now is the total of all frangos.

1.PNG2.PNG

 

And also, i need 4 columns, not 1 that is the total. 

@Anonymous

 

Have you put frango as rows, Quarters as Columns and values will be the new measure?

On a matrix and not on a single table

Anonymous
Not applicable

Yes i do.

1.PNG

 

Expected for first frango:

3.PNG

Is it possible to share the work space?
Anonymous
Not applicable

Not really...

But i will try to create a file with dummy data for you.

 

Anonymous
Not applicable

@Anonymous

 

Please change the formula to this one:

 

Cumulative_Actual = 
CALCULATE (
        SUM ( Sheet1[Value] ),
        FILTER (
            ALLEXCEPT( Sheet1, Sheet1[frango]),
            Sheet1[Quarter] <= MAX ( Sheet1[Quarter] )
        )
    )

Aslo you can see the formula in this workspace

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.