Forum Discussion
afrutos
Resolver I
4 years agoFormula Switch
Hello good morning to all, I have a question about a formula, let's see if someone can help me. Thank you very much I am trying to create a measure in which, if I select with my selector the Gross ...
- 4 years ago
afrutos , can you try to print what is coming inside in MAX ( Selector[Selección] ) like below just to check whether it is going inside correct condtion or not.
Selección Detalle = IF ( ISCROSSFILTERED ( Selector[Selección] ), MAX ( Selector[Selección] ) )or try this:-
Selección Detalle = VAR selected_value = SELECTEDVALUE ( Selector[Selección] ) RETURN IF ( ISCROSSFILTERED ( Selector[Selección] ), SWITCH ( TRUE (), ISBLANK ( selected_value ), "Nada pte", selected_value = "Importe Bruto", [Bruto], selected_value = "Importe Neto", [Importe Neto], selected_value = "Base Imponible", [BI NOBLANK], [BI NOBLANK] ), [BI NOBLANK] )
afrutos
Resolver I
4 years agoHi, thank you in advanced.
I made it, but still not working...
This is getting me crazy.
Samarth_18
Community Champion
4 years agoafrutos , can you try to print what is coming inside in MAX ( Selector[Selección] ) like below just to check whether it is going inside correct condtion or not.
Selección Detalle =
IF (
ISCROSSFILTERED ( Selector[Selección] ),
MAX ( Selector[Selección] )
)
or try this:-
Selección Detalle =
VAR selected_value =
SELECTEDVALUE ( Selector[Selección] )
RETURN
IF (
ISCROSSFILTERED ( Selector[Selección] ),
SWITCH (
TRUE (),
ISBLANK ( selected_value ), "Nada pte",
selected_value = "Importe Bruto", [Bruto],
selected_value = "Importe Neto", [Importe Neto],
selected_value = "Base Imponible", [BI NOBLANK],
[BI NOBLANK]
),
[BI NOBLANK]
)
- afrutos4 years ago
Resolver I
Hi,
Now iw working perfectly, ut I don't understand anything,
Why is working by defining a variable?Thank you in advanced