cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Resolver II

## WHAT IF DYNAMIC COLUMN

I need to change ranges dynamically and compare them, the idea is to know what happens if we change the goals, how many people would meet or not. What I am trying to do is use "what if" to change the goals and see what happens.

EXP=IF([SALES]<SELECTEDVALUE([WHATIF1])&&[SALES]>=SELECTEDVALUE([WHATIF2]);"RANGE1";

IF([SALES]<SELECTEDVALUE([WHATIF3])&&[SALES]>=SELECTEDVALUE([WHATIF4]);"RANGE2";"RANGE3")

1 ACCEPTED SOLUTION
Resolver II

thnk Marcus, @mwegener

Its perfect just what I needed😀, and if now I want to know how many are 1, 2 or 3 on cards😅

9 REPLIES 9
Community Support

Using measure may meet your needs.

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MVP

Hi @santiagomur ,

could you provide a sample pbix file?

Regards,

Marcus

Dortmund - Germany

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Resolver II

I can't but, i can give another example, i need to use the selectedvalue on a calculated column as simple like new

goal=table[sales]*selectedvalue(table_what_If[nowgoal] and see the result per row (table) not as a measure or in a card

my problem is that when i try the value of the selectedvalue comes as blanck.

MVP

Hi @santiagomur ,

https://valq.com/

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

MVP

Hi @santiagomur ,

For dynamic calculations, you must use measures.

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Resolver II

thnk,  @mwegener

and you know if it is  way to made a measure using if.

what i need to do is something like this

whatif selectedvalue

whatif1: 2 whatif2=5  whatif3=10

column1: between 0 and 1 =  level0

column1: between 2 and 4 =  level1

column1: between 5 and 9 = level2

colmn1    level

emp1       1

emp2       2

emp3       8

MVP

Hi @santiagomur ,

look at this.

PBIX

Regards,

Marcus

Dortmund - Germany

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Resolver II

thnk Marcus, @mwegener

Its perfect just what I needed😀, and if now I want to know how many are 1, 2 or 3 on cards😅

MVP
``Count Level 0 = COUNTROWS ( FILTER ( VALUES ( 'Table'[Emp] ), [level] = 0 ) )``

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors