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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors