cancel
Showing results for
Did you mean:
Frequent Visitor

## Matrix not totaling correctly on the column total

I have a matrix and the measure that i have in place is not totaling correctly on the grand total. I have seen a few other questions similar to this but i dont fully understand how to fix this.

For the highlighted totals, i would expect them to be 8 and 4, not 4 and 5.

Any ideas?

The measure is:

Events = IF(MONTH(MAX(FTE_Table[Posted Dt.]))=12,[Ranking],0)

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

## Re: Matrix not totaling correctly on the column total

Hi @analyst312 ,

Try this:

1. Create a new column.

``Month = MONTH(FTE_Table[Posted Dt.])``

2. Create a measure.

``````Events =
IF (
HASONEFILTER ( FTE_Table[Posted Dt.].[Month] ),
IF ( MAX ( FTE_Table[Month] ) = 12, [Ranking], 0 ),
CALCULATE ( [Ranking], FTE_Table[Month] = 12 )
)
``````

Best Regards,
Icey

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

3 REPLIES 3
Super User IV

## Re: Matrix not totaling correctly on the column total

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

---------------------------------------

Putting square pegs in round holes since 1972.

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Datanaut!

Super User IV

## Re: Matrix not totaling correctly on the column total

calculate(IF(MONTH(MAX(FTE_Table[Posted Dt.]))=12,[Ranking],0),values(FTE_Table[Posted Month])).

You need to have context. Please refer to my blog on date diff, how to context in measure calculation:https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin

Community Support

## Re: Matrix not totaling correctly on the column total

Hi @analyst312 ,

Try this:

1. Create a new column.

``Month = MONTH(FTE_Table[Posted Dt.])``

2. Create a measure.

``````Events =
IF (
HASONEFILTER ( FTE_Table[Posted Dt.].[Month] ),
IF ( MAX ( FTE_Table[Month] ) = 12, [Ranking], 0 ),
CALCULATE ( [Ranking], FTE_Table[Month] = 12 )
)
``````

Best Regards,
Icey

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

Announcements

#### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

#### April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

#### MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors