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
Anonymous
Not applicable

Prevent Summarization in Table with Measures and Columns

Hi all,

 

I am looking for help with the following issue:

 

I have two measures that calculate a opening and closing balance based on a min and max date selected. Works all perfectly fine. The requirements for my task are asking me to give the end user the ability to select more than one month at a time. Unfortunately, when I do so, I see everything summarize. Ideally, I would like to have all columns summarize, BUT the Opening and Closing Calc Columns (see below). 

 

ProductBKOpeningBalanceCalcClassSwitchDepositLoanSwitchGroupSwitchInstrumentSwitchLineSwitchProductSwitchSmallChangesNewLostClosingBalanceCalc
1118000300000000000180003000
12139997300000000013999730
135994000000000005994000
145999400000000005999400

 

My measures look like this: 

OpeningBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[OpeningBalance]), FILTER('TS_Continuity (2)','TS_Continuity (2)'[EffectiveDate] = [MinDate]),ALL('TS_Continuity (2)'))
 

and 

 

ClosingBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[ClosingBalance]), FILTER('TS_Continuity (2)','TS_Continuity (2)'[EffectiveDate] = [MaxDate]))
 
I would appreciate any help 🙂 
 
Thanks,
 
Sebastian 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Move the min and max  date inside the calculation if you want data by month

 

example

OpeningBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[OpeningBalance]), FILTER(allselected('TS_Continuity) (2)','TS_Continuity (2)'[EffectiveDate] = min('TS_Continuity (2)'[EffectiveDate] )),ALL('TS_Continuity (2)'))
 

and 

 

ClosingBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[ClosingBalance]), FILTER(allselected('TS_Continuity )(2)','TS_Continuity (2)'[EffectiveDate] = max(TS_Continuity (2)'[EffectiveDate] )))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Move the min and max  date inside the calculation if you want data by month

 

example

OpeningBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[OpeningBalance]), FILTER(allselected('TS_Continuity) (2)','TS_Continuity (2)'[EffectiveDate] = min('TS_Continuity (2)'[EffectiveDate] )),ALL('TS_Continuity (2)'))
 

and 

 

ClosingBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[ClosingBalance]), FILTER(allselected('TS_Continuity )(2)','TS_Continuity (2)'[EffectiveDate] = max(TS_Continuity (2)'[EffectiveDate] )))
Anonymous
Not applicable

Thank you so much! It almost worked, I just needed to take away the first "allselected". Here is the final solution I used. Again, thanks so much!

 

OpeningBalanceCalc = CALCULATE(SUM('TS_Continuity (2)'[OpeningBalance]), FILTER('TS_Continuity (2)','TS_Continuity (2)'[EffectiveDate] = min('TS_Continuity (2)'[EffectiveDate])),ALL('TS_Continuity (2)'))

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.