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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dynamic Slicer for Calculated Measure

I am attempting to get a slicer like in the first image below. I don't know how it was created but I do have the code used for it. Can anyone help duplicate this kind of slicer. See code and images below. 

 

1.PNG

 

 

 

Per capita flow (gpcd) = GENERATESERIES(50, 130, 10) // series that gives slicer the values //
Per capita flow (gpcd) Value = SELECTEDVALUE('Per capita flow (gpcd)'[Per capita flow (gpcd)], 50) // selecting a value to use for calculation //

 

 

 

1 ACCEPTED SOLUTION
edhans
Community Champion
Community Champion

That was done using the What If Parameter feature. See this article for an overview.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Community Champion
Community Champion

That was done using the What If Parameter feature. See this article for an overview.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Perfect, thanks!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors