Forum Discussion
Anonymous
2 years agoNot applicable
Dax comparison operations do not support comparing values of type integer with the values of text.
per_fin = SWITCH( t_calendar[P1] = "4 Weeks", t_calendar[P2] =VALUE( t_calendar[P1] + t_calendar[P2]) ,"8 Weeks ", t_calendar[P3] = VALUE(t_calendar[P1] +t_calendar[P2] +t_calendar[P3]) , "12 We...
Ritaf1983
Super User
2 years agoHi Anonymous
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
Anonymous
2 years agoNot applicable
Hi Ritaf1983 , i have p1, p2, p3 , p4 and p5 columns as below
P1 = IF (t_calendar[row_num] <=4 ,"4 weeks" );
P2 = IF( t_calendar[row_num] <=8 , "8 weeks");
P3 = IF( t_calendar[row_num] <=12 , "12 weeks");
P4 = IF( t_calendar[row_num] <=16 , "16 weeks");
P5 = IF( t_calendar[row_num] > 16 , "16 weeks");
so now , i want final_per columns as below 1 column
so now , i want final_per columns as below 1 column
per_fin =
SWITCH(TRUE(),
t_calendar[P1] = "4 weeks",
t_calendar[P2] =VALUE( t_calendar[P1] + t_calendar[P2]) ,"8 weeks",
t_calendar[P3] = VALUE(t_calendar[P1] + t_calendar[P2] + t_calendar[P3]) , "12 weeks",
t_calendar[P4] = VALUE(t_calendar[P1] + t_calendar[P2] +t_calendar[P3] +t_calendar[P4]) , "16 weeks" ,
t_calendar[P5] = VALUE(t_calendar[P1] +t_calendar[P2] +t_calendar[P3] +t_calendar[P4] +t_calendar[P5] ), ">16 weeks"
)
So, here i want to get the data in slicer , when P1 selects then "4 weeks" data should show , and if P2 selects in slicer then "8 weeks" data show , recepectivly 12, 16 and >16 ..but this switch condtion getting as " Dax omparison operations do not support comparing values of type integer with the values of text."
So, here i want to get the data in slicer , when P1 selects then "4 weeks" data should show , and if P2 selects in slicer then "8 weeks" data show , recepectivly 12, 16 and >16 ..but this switch condtion getting as " Dax omparison operations do not support comparing values of type integer with the values of text."
any help is appriciated
- Ritaf19832 years ago
Super User
Hi Anonymous
Sorry, I need the data to help...