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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Matrix total days calculation is wrong

need help with this issue 

 

rockdotnet_0-1670043477857.png

 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

 

You can try the following methods.

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

vzhangti_0-1670219659985.png

Please check the attachment.

 

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.

View solution in original post

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)

Hi, @Anonymous 

 

You can try the following methods.

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

vzhangti_0-1670219659985.png

Please check the attachment.

 

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.

NanDeb
Helper I
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

ddpl
Solution Sage
Solution Sage

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

 

or

 

ddpl_0-1670046310838.png

 

 

Ref : https://www.youtube.com/watch?v=VE5Ephqk7A0

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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