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
Tubster66
Regular Visitor

Summarize table with filters

Hi

 

Power BI newbie - apologies if this is rookie error stuff.

 

I have a SUMMARIZE table generated with Forecast = summarize(budget,Budget[Name],Budget[Period],Budget[Year],"forecast",(calculate(sum(Budget[Budget]),all(Budget[Period]))/12)).

 

I have done the above because I want to flatten the seasonal monthly budgets across the year.

 

I use a visual card to display the following measure:

 

msVarForecast = calculate(sum('Fees Billed'[Fees Billed])-sum(Forecast[forecast]),allselected('Fee Earners'[NAME]))

 

This is ok for when I look at the whole business, but when I filter down to an individual NAME I get their fees billed are compared to the whole forecast, not just theirs.

 

BTW - Budget table has NAMEs that have no Fees Billed and vice versa the Fees Billed Table contains people who have billed but have no budget.

 

QUestions.

 

1) How do I get it so that the result in the visial is just their variance?

 

Thanks

 

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

 

Hi @Tubster66

 

Possibly because you are still using the ALL function in your first function.  Possibly try changing that to be ALLSELECTED ??

 Forecast = summarize(
budget,Budget[Name],Budget[Period],Budget[Year],
"forecast",(calculate(sum(Budget[Budget]),ALLSELECTED (Budget[Period]))/12)).
 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

 

Hi @Tubster66

 

Possibly because you are still using the ALL function in your first function.  Possibly try changing that to be ALLSELECTED ??

 Forecast = summarize(
budget,Budget[Name],Budget[Period],Budget[Year],
"forecast",(calculate(sum(Budget[Budget]),ALLSELECTED (Budget[Period]))/12)).
 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark

 

Thanks for your reply - it worked.

 

Much appreciated

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.