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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
TheAmazingPBI
Regular Visitor

Help with a calculate, sum and filter function to apply page filters

Hi all

Been trying to find a solution on google and this forum for my problem and unable to locate - I'm sure its an easy fix which I can't properly describe.

 

I am trying to Sum 'Revenue' in the table belonging to "BG1" but I also want the other filters already selected on the Power BI page to apply. e.g. Month of June 2022 is already selected on the page. The following expression below appears to show me a total value for revenue that is not filtered by my current selections on the page. Can someone help me correct the below?

 

Thank you.

 

=CALCULATE(
SUM('Table1'[Revenue]),
FILTER(ALLSELECTED('Table1'),'Table1'[BusinessGroup] = "BG1")
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

=CALCULATE(
SUM('Table1'[Revenue]),
'Table1'[BusinessGroup] = "BG1")

View solution in original post

4 REPLIES 4
olgad
Super User
Super User

Have you checked the relationship if it is active between the date table and sales table? edit interactions? so there is no accidental click on none, from month filter to  the visual where you display BG1. 

Is it only month filter that doesnt filter or also other slicers?


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

thanks for the quick reply, they all related as the various fields I am filtering by are from the same rows in the same table. e.g. each Business Group has their own Month and all data for business groups is appended to the same table

wdx223_Daniel
Super User
Super User

=CALCULATE(
SUM('Table1'[Revenue]),
'Table1'[BusinessGroup] = "BG1")

This was it. Unfortunately didn't work for me as I tried to use this in Button mouse over text as opposed to a card or table.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors