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.
Solved! Go to Solution.
Hi! there is a problem in the syntax. Check the doc: https://docs.microsoft.com/en-us/dax/switch-function-dax
It should be like this:
SWITCH( MONTH([First_Sale_Date_SKU]) ;
11;12;
12;1;
MONTH('DB2 (2)'[First_Sale_Date_SKU])
)
First is the expression. You don't have to add the "=" there, it will asume it.
Regards,
Happy to help!
Hi @Anonymous ,
You need to use below expression to see whteher it work or not
Column = SWITCH(TRUE(),MONTH('Table (2)'[date])=11,12 ,MONTH('Table (2)'[date])=12,1)
or
Column = SWITCH(MONTH('Table (2)'[date]),11,12 ,12,1)
In your expression, you didn't write the correct condition, so it can't compare the value(MONTH('DB2 (2)'[First_Sale_Date_SKU]), you didn't give the comparison value).
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You need to use below expression to see whteher it work or not
Column = SWITCH(TRUE(),MONTH('Table (2)'[date])=11,12 ,MONTH('Table (2)'[date])=12,1)
or
Column = SWITCH(MONTH('Table (2)'[date]),11,12 ,12,1)
In your expression, you didn't write the correct condition, so it can't compare the value(MONTH('DB2 (2)'[First_Sale_Date_SKU]), you didn't give the comparison value).
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi! there is a problem in the syntax. Check the doc: https://docs.microsoft.com/en-us/dax/switch-function-dax
It should be like this:
SWITCH( MONTH([First_Sale_Date_SKU]) ;
11;12;
12;1;
MONTH('DB2 (2)'[First_Sale_Date_SKU])
)
First is the expression. You don't have to add the "=" there, it will asume it.
Regards,
Happy to help!
what is data type of First_Sale_Date_SKU
It's a Date type column
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 |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |