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
Jorgast
Resolver II
Resolver II

Monthly Sum as a Measure

Hello BI Friends,

 

I need your help. I am trying to get the monthly sum as a measure for each month. The Category table is connected to a date table.

I have tried to calculate using Allselected, allexcept, and filter. None of these seem to work. I am not sure what I am missing.

 

Thanks in Advance.

 

MMMCategoryCount
May-21 15070
May-21Contract31029
May-21Commercial117946
May-21Industrial60420
May-21Pharma131
May-21Residential

417034

 

MMMCategoryCountDesired Results
May-21 15070641630
May-21Contract31029641630
May-21Commercial117946641630
May-21Industrial60420641630
May-21Pharma131641630
May-21Residential417034641630

 

MMMCategoryCount
Jun-21 16496
Jun-21Contract36503
Jun-21Commercial136074
Jun-21Industrial68410
Jun-21Pharma163
Jun-21Residential497232

 

MMMCategoryCountDesired Results
Jun-21 16496754878
Jun-21Contract36503754878
Jun-21Commercial136074754878
Jun-21Industrial68410754878
Jun-21Pharma163754878
Jun-21Residential497232754878

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Jorgast,

 

Try this measure:

 

Monthly Sum = 
CALCULATE (
    SUM ( Category[Count] ),
    ALL ( Category ),
    VALUES ( DimDate[Month Year] )
)

 

The Category table has a relationship with DimDate:

 

DataInsights_1-1627569619690.png

 

The visual uses DimDate[Month Year]:

 

DataInsights_0-1627569492349.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@Jorgast,

 

Try this measure:

 

Monthly Sum = 
CALCULATE (
    SUM ( Category[Count] ),
    ALL ( Category ),
    VALUES ( DimDate[Month Year] )
)

 

The Category table has a relationship with DimDate:

 

DataInsights_1-1627569619690.png

 

The visual uses DimDate[Month Year]:

 

DataInsights_0-1627569492349.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.