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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SLMR
Regular Visitor

Pivot/Matrix conditional sum row or individual row

Hello,
i have a simple pivot/matrix display:

SLMR_0-1720330136966.png

At the end of the table i only want to display the sum of the vaules of the last date within  a month.
Getting this data is no problem with views on the sql server or measures.
But the question is if there is a way to manipulte what is shown in the sum row (Gesamt)
Or can i add an individual row at the end of the table?

Any idea is welcome

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SLMR ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create measures. 

summe von tasks Measure = 
var _a=SUM('Table'[summe von tasks])
var _b=CALCULATE(MAX('Table'[Date]),FILTER(ALLSELECTED('Table'),'Table'[Markt]=MAX('Table'[Markt])))
var _c=CALCULATE(SUM('Table'[summe von tasks]),FILTER(ALLSELECTED('Table'),'Table'[Markt]=MAX('Table'[Markt]) && 'Table'[Date]=_b))
RETURN IF(ISFILTERED('Table'[Markt]),_c,IF(ISFILTERED('Table'[Date]),_a))
Measure = SUMX(VALUES('Table'[Markt]),[summe von tasks Measure])
Measure 2 = IF( ISFILTERED('Table'[Markt])=FALSE(),[Measure],SUM('Table'[summe von tasks]))

(3) Then the result is as follows.

vtangjiemsft_0-1720495289129.png

 

 

Best Regards,

Neeko Tang

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

4 REPLIES 4
Anonymous
Not applicable

Hi @SLMR ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create measures. 

summe von tasks Measure = 
var _a=SUM('Table'[summe von tasks])
var _b=CALCULATE(MAX('Table'[Date]),FILTER(ALLSELECTED('Table'),'Table'[Markt]=MAX('Table'[Markt])))
var _c=CALCULATE(SUM('Table'[summe von tasks]),FILTER(ALLSELECTED('Table'),'Table'[Markt]=MAX('Table'[Markt]) && 'Table'[Date]=_b))
RETURN IF(ISFILTERED('Table'[Markt]),_c,IF(ISFILTERED('Table'[Date]),_a))
Measure = SUMX(VALUES('Table'[Markt]),[summe von tasks Measure])
Measure 2 = IF( ISFILTERED('Table'[Markt])=FALSE(),[Measure],SUM('Table'[summe von tasks]))

(3) Then the result is as follows.

vtangjiemsft_0-1720495289129.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thanks a lot!!!
That works like charme.
Have  a nice day,

Mikko

 

 

elitesmitpatel
Super User
Super User

Please share pbix file

 

I solved the problem using a paginated report and include it into the "normal" report.
Anyway i would like to know if there is any possibility to du the same with a matrix/pivot element

I tryed to drop the .pbix file here, but pbix fiels are not allowed?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.