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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Giadev
Frequent Visitor

Visual chart or table with one fixed value and other from slicer

Hi,

I need to create some visuals (both chart and table) with one fixet value and other from a slicer...

TABLE  
DateAccountValue
01/01/2021A2435
01/01/2021B243
01/01/2021C541
02/02/2021A11656
02/02/2021B653
02/02/2021C890

 

SLICER
A
B

A is selected and C in hidden (filtered ount in slicer)

VISUAL TABLE 
44197A2435
44197C541
44229A11656
44229C890

 

Any ideas?

 

Thanks

1 ACCEPTED SOLUTION
DataZoe
Microsoft Employee
Microsoft Employee

@Giadev A solution for this is to create an Accounts table without the fixed one, then set up an inactive relationship to the Accounts table. A measure then can bring in the fixed account value and the selected account value.

 

Accounts Slicer table:

Account Slicer = SUMMARIZE(filter('Table','Table'[Account]<>"C"),'Table'[Account])
 
Model:
 
DataZoe_1-1614391140982.png

 

 

Measure:

Measure = CALCULATE(sum('Table'[Value]),USERELATIONSHIP('Account Slicer'[Account],'Table'[Account]))+CALCULATE(sum('Table'[Value]),filter('Table','Table'[Account]="C"))
 
Then use the Measure and Accounts from first table in your visual:
DataZoe_2-1614391154930.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

4 REPLIES 4
DataZoe
Microsoft Employee
Microsoft Employee

@Giadev A solution for this is to create an Accounts table without the fixed one, then set up an inactive relationship to the Accounts table. A measure then can bring in the fixed account value and the selected account value.

 

Accounts Slicer table:

Account Slicer = SUMMARIZE(filter('Table','Table'[Account]<>"C"),'Table'[Account])
 
Model:
 
DataZoe_1-1614391140982.png

 

 

Measure:

Measure = CALCULATE(sum('Table'[Value]),USERELATIONSHIP('Account Slicer'[Account],'Table'[Account]))+CALCULATE(sum('Table'[Value]),filter('Table','Table'[Account]="C"))
 
Then use the Measure and Accounts from first table in your visual:
DataZoe_2-1614391154930.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

thank you, that's a good solution. is there a way to show C even if you don't select anything in the slicer?

Giadev
Frequent Visitor

resolved

 

Measure =
CALCULATE(
IF(SELECTEDVALUE('Account Slicer'[Account])=BLANK(),
CALCULATE(sum('Table'[Value]),FILTER('Table','Table'[Account]="C")),
CALCULATE(sum('Table'[Value]),USERELATIONSHIP('Account Slicer'[Account],'Table'[Account]))+CALCULATE(sum('Table'[Value]),FILTER('Table','Table'[Account]="C"))))
DataZoe
Microsoft Employee
Microsoft Employee

@Giadev Yes, perfect!  

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors