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
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
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.

Top Solution Authors