Forum Discussion
Dyanmic Title card help
- 8 years ago
Hello Anonymous,
Xiaoxin,
Thank you for all your help; however I have found a solution to my problem. The snippet of code for the measure I used was
Sample Measure =
VAR Location =
VALUES ( Sheet1[Location] )
VAR sample3 = COUNTROWS ( Location )
VAR NumberOfPossibleLocations =
COUNTROWS ( ALL ( Sheet1[Location] ))
VAR AllButLastSelectedLocation =
TOPN ( NumberOfPossibleLocations - 1, Location )
VAR LastSelectedLocation =
EXCEPT (Location, AllButLastSelectedLocation)
RETURN
"Sample Text 1 Showing results for "
& IF (
sample3= NumberOfPossibleLocations,
"sample text 2 ",
"For "
& IF (
sample3 = 1,
CONCATENATE(VALUES(Sheet1[Location])," This is determinate text and is used for one selection"),
IF(
sample3 =2,
"Select Only one please my guy",
IF(
sample3 = 3,
"Select Only one please my guy X3",
IF(
sample3 = 4,
"Select Only one please my guy X4",
IF(sample3 = 5,
"Select Only one please my guy X5",
"DEFAULT TEXT HERE PLEASE"
)
& LastSelectedLocation
)))))Once again thank you for all your help, your insight was useful in making this information, although I did confirm that the measure did not accept a > sign in places where sample3 = 4 would be, this is also an acceptable solution.
Regards,
Microsoftrookie
Hi microsoftrookie,
>>Do you think there may be any other solutions? If not, please let me know and again thank you for your time.
Can you share some sample result which you expect?
Regards,
Xiaoxin Sheng
Hello Anonymous,
Xiaoxin,
Thank you for all your help; however I have found a solution to my problem. The snippet of code for the measure I used was
Sample Measure =
VAR Location =
VALUES ( Sheet1[Location] )
VAR sample3 = COUNTROWS ( Location )
VAR NumberOfPossibleLocations =
COUNTROWS ( ALL ( Sheet1[Location] ))
VAR AllButLastSelectedLocation =
TOPN ( NumberOfPossibleLocations - 1, Location )
VAR LastSelectedLocation =
EXCEPT (Location, AllButLastSelectedLocation)
RETURN
"Sample Text 1 Showing results for "
& IF (
sample3= NumberOfPossibleLocations,
"sample text 2 ",
"For "
& IF (
sample3 = 1,
CONCATENATE(VALUES(Sheet1[Location])," This is determinate text and is used for one selection"),
IF(
sample3 =2,
"Select Only one please my guy",
IF(
sample3 = 3,
"Select Only one please my guy X3",
IF(
sample3 = 4,
"Select Only one please my guy X4",
IF(
sample3 = 5,
"Select Only one please my guy X5",
"DEFAULT TEXT HERE PLEASE"
)
& LastSelectedLocation
)))))
Once again thank you for all your help, your insight was useful in making this information, although I did confirm that the measure did not accept a > sign in places where sample3 = 4 would be, this is also an acceptable solution.
Regards,
Microsoftrookie