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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
bml123
Post Patron
Post Patron

Passing measure to the slicer

Hi,

 

I have a measure called measure 1 which calculates the difference between this year's sales and the previous sales.

I have created another measure to show if the above measure value is positive or negative for each product id. 

I want to pass this measure in the slicer so that when the user selects 'Positive' it will show the positive values of measure 1 and shows negative values if the user selects 'Negative'.

 

But I am unable to pass measure in the slicer.  Is there a way to acheive this?

 

2 REPLIES 2
naveenmechu
Helper I
Helper I

Hi,

Create a lookup table having "Positive" and "Negative" value. Tweak measure by using selectedvalue

 

Hope It will help you, Please share Pbix sample file if need detailed help.

 

Thanks 

Naveen Mechu

bcdobbs
Community Champion
Community Champion

You'd need to turn the logic on it's head. 

You want to use a disconnected table which just has "Postive" and "Negative" in it.

 

Then use SELECTEDVALUE to get the value from the slicer and wire it into a measure which can be used on the visual level filter. 

 

Sorry that's a very hand wavy description. If you share a demo file I can try and help put it into action.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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