Forum Discussion
brunomitsuo
7 years agoFrequent Visitor
Dynamic Slider as What-if text and value
Hello Everyone! I need some help doing some simulations with food products and it's costs for a Lunch/Breakfast menu that contains Fruit, Drink, Meat, Salad. I have a list of products that ca...
- 7 years ago
Hi brunomitsuo
You may create a table as slicer.Then create measures to get the new food and cost.Attached sample file for your reference.
Cost_New = IF ( HASONEVALUE ( 'Table'[Food] ), SUMX ( Doubts, IF ( Doubts[Food] = MAX ( 'Table'[Food] ), SUM ( LOP[Cost] ), Doubts[Cost] ) ) )Food_New = IF ( HASONEVALUE ( 'Table'[Food] ), IF ( MAX ( Doubts[Food] ) = MAX ( 'Table'[Food] ), MAX ( LOP[Food] ), MAX ( Doubts[Food] ) ) )Regards,
v-cherch-msft
Microsoft Employee
7 years agoHi brunomitsuo
You may create a table as slicer.Then create measures to get the new food and cost.Attached sample file for your reference.
Cost_New =
IF (
HASONEVALUE ( 'Table'[Food] ),
SUMX (
Doubts,
IF ( Doubts[Food] = MAX ( 'Table'[Food] ), SUM ( LOP[Cost] ), Doubts[Cost] )
)
)
Food_New =
IF (
HASONEVALUE ( 'Table'[Food] ),
IF (
MAX ( Doubts[Food] ) = MAX ( 'Table'[Food] ),
MAX ( LOP[Food] ),
MAX ( Doubts[Food] )
)
)
Regards,
brunomitsuo
7 years agoFrequent Visitor
Hey v-cherch-msft !
That's amazing ! It worked just great! Super thanks!
I will try to use it on my real database. :smileyvery-happy: