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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
horror
Regular Visitor

Slicer on a Sum

Hi,

I have a simple PowerBI that gives me a userlist with their summed of sales ($).

 

Underlying data is:

customerid, date, sum(sales)

 

from 1st january - 1 october

 

 

I would like to be able to set a slicer, that the viewer can filter for customers e.g. that spend > 200$.

thing is that the slicer applies to the underlying data, so it filters out single rows < 200$ and does not apply to the summed up values shown in the table.


Anybody can explain me how I can make a slicer that applies to the summed up values?

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @horror,

 

Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

What you are looking for is the disconnected table trick. I have an upcoming blog post on this in the Community Blog (under the "more" dropdown above). Basically, create a table that is unrelated to anything with your slicer values. Here is an abbreviated version of the article:

 

Given the set of these core tables:

 

Employees

Employee
Greg
Bill
Joe
David
Jimbo

 

Training

EmployeeTrainingDate
GregTraining 19/19/2017
BillTraining 19/19/2017
JoeTraining 19/19/2017
DavidTraining 19/19/2017
JimboTraining 19/19/2017
GregTraining 28/19/2017
BillTraining 28/19/2017
DavidTraining 28/19/2017
GregTraining 37/19/2017
BillTraining 37/19/2017
JoeTraining 37/19/2017
DavidTraining 37/19/2017

 

Hours

EmployeeWeekHours
Greg9/17/201740
Greg9/10/201740
Greg9/3/201740
Greg8/27/201740
Greg8/20/201740
Greg8/13/201740
Greg8/8/201740
Greg8/1/201740
Joe9/17/201724
Joe9/10/201724
Joe9/3/201724
Joe8/27/201724
Joe8/20/201724
Joe8/13/201724
Joe8/8/201724
Joe8/1/201724

 

The Employees table is simply a unique list of Employee ID's. The Training table has a row for every training event that an employee attended. Finally, the Hours table lists the week ending date when an employee worked. Employees are expected to attend training events when they are working and are not expected to attend training events when they are not working. The Hours table has been abbreviated.

 

The relationships between the tables are as follows. All relationships are between the Employee columns of the tables.

 

Employees 1<>* Hours

Employees 1>* Training

 

Measures:

 

Attendance = IF(ISBLANK(MAX([Date])),"Not Attended","Attended")

 

Attended = IF(ISBLANK(MAX([Date])),BLANK(),"Attended")
NotAttended = IF(ISBLANK(MAX([Date])),"Not Attended",BLANK())

 

Measures to Show = 
IF(
        // This first IF condition forces the measure to evaluate in the context of the visual
	HASONEVALUE(Employees[Employee]),
                // This next condition avoids getting the error that the visual cannot be displayed
		IF(HASONEVALUE(Attendance[Attendance]),
                        // This switch statement uses the values from our Attendance slicer to determine which measure to display
			SWITCH(
          			VALUES(Attendance[Attendance]),
          			"Attended",[Attended],
          			"Not Attended",[NotAttended]
	 			),
                        // If the Attendance slicer has not been selected, just display the date of the training
			MAX([Date])
		)
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors