cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Anonymous
Not applicable

## Matrix total days calculation is wrong

need help with this issue

1 ACCEPTED SOLUTION
Community Support

Hi, @Anonymous

You can try the following methods.

``Measure = CALCULATE(COUNT('Date'[Date]),ALLEXCEPT('Date','Date'[Month],'Date'[Year]))``

Best Regards,

Community Support Team _Charlotte

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

4 REPLIES 4
Anonymous
Not applicable
the Days per month is a measure.  Please find below and if i go to the format visual and select row subtotals. it does not sum up correctly.

Days per Month = DATEDIFF(
EOMONTH(MAX('OSR Revenue'[Billing_Period]),-1),
EOMONTH(MAX('OSR Revenue'[Billing_Period]),0),DAY)
Community Support

Hi, @Anonymous

You can try the following methods.

``Measure = CALCULATE(COUNT('Date'[Date]),ALLEXCEPT('Date','Date'[Month],'Date'[Year]))``

Best Regards,

Community Support Team _Charlotte

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

Helper I

What is your measure for Totals days in Month? Do you have a date table?

I would add a logical test to the measure to check if there row is a month or not and then return a different calculation when on the totals row.

Good explanation here

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Solution Sage

@Anonymous  use the "HASONEVALUE" Functon for days per month column.

or

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors