Forum Discussion
Dynamic Title
- 5 years ago
unnijoy I think I forgot to close ) before =1
SWITCH(TRUE(),
NOT(ISFILTERED('Month DB'[Month])),"MTD",
ISFILTERED('Month DB'[Month])&&CALCULATE(DISTINCTCOUNT('Month DB'[Month]),ALLSELECTED('Month DB'[Month]))=1,"MTD","Multiple Month's")
unnijoy , Create measure like
Switch ( True() ,
not(isfiltered(Date[Month]) ) , "MTD",
isfiltered(Date[Month]) && countx(allselected(Date), Date[month]) =1, "MTD",
"Multiple Months"
)
Hi amitchandak ,
If all months are seleced the title is changing to MTD. But if i select any one month it is changin to "Multiple Months".
How to fix it. Please help.
- amitchandak5 years agoSuper User
unnijoy , I think for all month you needed MTD, First condition is for that. I changed the second one
Switch ( True() ,
not(isfiltered(Date[Month]) ) , "MTD", // Change this when nothing is selected or all selected
isfiltered(Date[Month]) && calculate(distinctCOUNT( Date[month]),allselected(Date)) =1, "MTD",
"Multiple Months"
)- unnijoy5 years agoPost Prodigy
Hi amitchandak ,
the is how i use the code.
SWITCH(TRUE(),NOT(ISFILTERED('Month DB'[Month])),"MTD",ISFILTERED('Month DB'[Month])&&CALCULATE(DISTINCTCOUNT('Month DB'[Month]),ALLSELECTED('Month DB'[Month])=1,"MTD","Multiple Month's")I am gettin the below error.
"The True/False expressions does not specify a column . Each True/False expressions used as a table filter expression must refer to excatly one column".
- amitchandak5 years agoSuper User
unnijoy I think I forgot to close ) before =1
SWITCH(TRUE(),
NOT(ISFILTERED('Month DB'[Month])),"MTD",
ISFILTERED('Month DB'[Month])&&CALCULATE(DISTINCTCOUNT('Month DB'[Month]),ALLSELECTED('Month DB'[Month]))=1,"MTD","Multiple Month's")