Hi everyone,
I need to use SWITCH only for cases where there are FILTER values.
For example, the function SWITCH:
SWITCH(
TRUE(),
[Sales%] <0, "Less than 0%",
[Sales%] <= 0.1, "0%-10%",
[Sales%] >= 0.1, "10% or more"
)
The function should only be calculated if the following conditions apply for a given sales order:
[Sales$] >= 0,
[Sales#] >= 0
Is it at all possible to create a measure that will perform these calculations?
Translated with DeepL
I am not sure switch is the right Dax function here. What exactly do you want to achieve with your code?
but in general when you want to use a filter on some dax code you do it like this.
calculate([code], [Sales$] >= 0, [Sales#] >= 0)
I hope this helps.
@Misq , Try like
if([Sales$] >= 0 && [Sales#] >= 0 ,
SWITCH(
TRUE(),
[Sales%] <0, "Less than 0%",
[Sales%] <= 0.1, "0%-10%",
[Sales%] >= 0.1, "10% or more"
), blank())
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.
User | Count |
---|---|
233 | |
53 | |
48 | |
48 | |
44 |
User | Count |
---|---|
288 | |
241 | |
159 | |
85 | |
65 |