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
bsas
Post Patron
Post Patron

Show different data on plot based on slicer selection

Hi PBI Experts,

 

I need your expertise whether I can show different data (line on the plot) based on slicer selection. I have slicer by territory: "North America or Europe or both". I need to show fact% for each territory if it is selected but I need to show totalFact% if both are selected. TotalFact% <> fact%. Can I somehowe show different value in case where both territories are selected?

 

Example of my table and data below.

 

TerritoryMonthShortMonthFact %TotalFact%
North AmericaJanSunday, January 1, 2017-1.2308-3.2801
North AmericaFebWednesday, February 1, 20170.52280.1904
North AmericaMarWednesday, March 1, 20170.50570.4356
North AmericaAprSaturday, April 1, 20170.52280.546
North AmericaMayMonday, May 1, 20170.62130.7022
North AmericaJunThursday, June 1, 20170.52590.5235
North AmericaJulSaturday, July 1, 20170.52280.8157
North AmericaAugTuesday, August 1, 20170.37060.2724
North AmericaSepFriday, September 1, 201700
North AmericaOctSunday, October 1, 201700
North AmericaNovWednesday, November 1, 201700
North AmericaDecFriday, December 1, 201700
EuropeJanSunday, January 1, 20170-3.2801
EuropeFebWednesday, February 1, 201700.1904
EuropeMarWednesday, March 1, 201700.4356
EuropeAprSaturday, April 1, 2017-0.09490.546
EuropeMayMonday, May 1, 20170.4850.7022
EuropeJunThursday, June 1, 20170.6750.5235
EuropeJulSaturday, July 1, 20170.79690.8157
EuropeAugTuesday, August 1, 20170.27240.2724
EuropeSepFriday, September 1, 201700
EuropeOctSunday, October 1, 201700
EuropeNovWednesday, November 1, 201700
EuropeDecFriday, December 1, 201700

 

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @bsas,

 

How does your report look like? You could try to use a measure of TotalFact% instead.

1. If you don't care the initial status, you can try this:

Measure =
IF ( HASONEVALUE ( Table1[Territory] ), BLANK (), SUM ( Table1[TotalFact%] ) )

2. If you want to hide the TotalFact% in the start, you could try this:

 

Measure 3 =
IF (
    ISFILTERED ( Table1[Territory] )
        && DISTINCTCOUNT ( Table1[Territory] ) = 2,
    SUM ( Table1[TotalFact%] ),
    BLANK ()
)

Show different data on plot based on slicer selection.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @bsas,

 

How does your report look like? You could try to use a measure of TotalFact% instead.

1. If you don't care the initial status, you can try this:

Measure =
IF ( HASONEVALUE ( Table1[Territory] ), BLANK (), SUM ( Table1[TotalFact%] ) )

2. If you want to hide the TotalFact% in the start, you could try this:

 

Measure 3 =
IF (
    ISFILTERED ( Table1[Territory] )
        && DISTINCTCOUNT ( Table1[Territory] ) = 2,
    SUM ( Table1[TotalFact%] ),
    BLANK ()
)

Show different data on plot based on slicer selection.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

Thanks @v-jiascu-msft,  2nd measure is great, I've changed it a little and created one more based on it. 

Hi @bsas,

 

It's my pleasure.

 

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.

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.