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.
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 Amount, it calculates the Gross Amount, if I select the Net Amount, it calculates the Net Amount and the same if I select the Taxable Base.
When the value of what I have selected is blank, it automatically puts me (Blank), however, I would like it to put "Nothing pending".
With my formula it is not working
This is my formula:
Thank you in advanced!
Solved! Go to Solution.
@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]
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
I've made it ut I still have the same problem
@afrutos , try like
SWITCH(TRUE(),
ISBLANK((Selector[Selección])),"Nada pte",
Max(Selector[Selección]) = "Importe Bruto", [Bruto],
Max(Selector[Selección]) = "Importe Neto", [Importe Neto],
Max(Selector[Selección]) = "Base Imponible", [BI NOBLANK] ,
[BI NOBLANK])
Hi, it gives me an error: A single value cannot be determined for the 'Selection' column in the 'Selector' table. This can happen when a measurement formula refers to a column containing many values without specifying an aggregation, such as min, max, count or sum, to obtain a single result
Remove one of the double brackets
Proud to be a Super User!
I modifyed it, but still have the same text error
@afrutos Small correction in your code. Please use like this:-
Selección Detalle =
IF (
ISCROSSFILTERED ( Selector[Selección] ),
SWITCH (
TRUE (),
ISBLANK ( MAX ( Selector[Selección] ) ), "Nada pte",
MAX ( Selector[Selección] ) = "Importe Bruto", [Bruto],
MAX ( Selector[Selección] ) = "Importe Neto", [Importe Neto],
MAX ( Selector[Selección] ) = "Base Imponible", [BI NOBLANK],
[BI NOBLANK]
),
[BI NOBLANK]
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi, thank you in advanced.
I made it, but still not working...
This is getting me crazy.
@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]
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi,
Now iw working perfectly, ut I don't understand anything,
Why is working by defining a variable?
Thank you in advanced
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |