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
rafaelprog
Frequent Visitor

SUM of matrix columns Total Current

I have the following matrix

 

Matrix.jpg

 

I'm trying to make the sum of the months

 

But when I add the measure "total current in period", it creates a column for each Month!

 

matrix 3.jpg

 

Total Current In Period = 
CALCULATE(
	SUM('AGG_INFOGER_CTR'[Total]);
	FILTER(
		CALCULATETABLE(
			SUMMARIZE(
				'DIM_PERIODO';
				'DIM_PERIODO'[Itemperiodo];
				'DIM_PERIODO'[Period]
			);
			ALLSELECTED('DIM_PERIODO')
		);
		ISONORAFTER(
			'DIM_PERIODO'[Itemperiodo]; MAX('DIM_PERIODO'[Itemperiodo]); DESC;
			'DIM_PERIODO'[Period]; MAX('DIM_PERIODO'[Period]);
		)
	)
)

 

The calculation is not wrong but I just wanted the summation of the last column!

Current total in the context of the row

Example:
matrix 4.jpg

What would be a dax function?  I am a beginner
Thanks!

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@rafaelprog,

The issue has nothing to do with DAX. No matter what additional column or measure you add in Value section of the Matrix visual, it will create a column for each month, and it is not possible to show only the last column.

In your scenario, does it return your expected result when you just reserve Total field in the Value section and turn on “Total column”?
1.PNG

 

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@rafaelprog,

The issue has nothing to do with DAX. No matter what additional column or measure you add in Value section of the Matrix visual, it will create a column for each month, and it is not possible to show only the last column.

In your scenario, does it return your expected result when you just reserve Total field in the Value section and turn on “Total column”?
1.PNG

 

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It Worked, Thanks

@rafaelprog,

Glad to hear the issue is solved, please mark my reply as answer, that way, other community members would easily find the answer when they get same issues.

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.