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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.