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
Anonymous
Not applicable

Join >=

Hi,

 

i have one table with climate scenario :

 

Temperature_shift |  Scenario

0 |  ok

2 |  warmer

4  |  game over

 

And i've got a parameter (in another table) that let the user slide and select a temperature warming scenario.

The slide is going from +0°  (no changes) to +6°c

The slide is in decimal type, the user can select a value like 2.7

 

If the user slide a little bit and select "+1,5°" value parameter, then i need to display the 1st line of my table :  0 | ok

If slide = "+3,9" --> 2 | warmer

if slide = "+4"    -->  4 | game over

if slide = "+7"    -->  4 | game over

 

Thanks for your kind help

1 ACCEPTED SOLUTION

Hi @Anonymous ,
This uses both tables, the previous one used a simple if off the slider only.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

Global Climate Change 1 = 
var _cur=MAX(Inc[Increase])
var _calc = CALCULATE(MAX('Global'[Temperature_shift]),'Global'[Temperature_shift]<=_cur)
var _scenario = CALCULATE(MAX('Global'[Scenario]),'Global'[Temperature_shift]=_calc)
return
_scenario

Global12.PNG

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Nathaniel_C
Super User
Super User

Hi @Anonymous ,
Good on you for doing this! My table is called Inc. and only goes to 5.

Global Climate Change = 
var _cur=MAX(Inc[Increase])

return


if( _cur<2,"OK",if(_cur<4,"warmer","game over"))

Global.PNG

 

Global1.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Anonymous ,
This uses both tables, the previous one used a simple if off the slider only.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

Global Climate Change 1 = 
var _cur=MAX(Inc[Increase])
var _calc = CALCULATE(MAX('Global'[Temperature_shift]),'Global'[Temperature_shift]<=_cur)
var _scenario = CALCULATE(MAX('Global'[Scenario]),'Global'[Temperature_shift]=_calc)
return
_scenario

Global12.PNG

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

sorry for the delay of my response

it did the trick thank you !

 

i'm curious to do this through a filter condition though

 

will try to make it

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.