-
1. Re: Format issue while Swapping measures using parameters
Andrew Watson Dec 6, 2017 6:30 AM (in response to MANOJ PRABHAKAR)I suspect if you want the 2 measures to be formatted differently you'll have to build the formatting into the calculated field. For example displayed AvgCallDuration measure would be a different calculated field doing the formatting within the calculation, something like str(DATEPART('minute',[AvgCallDuration])) + ':' + str(DATEPART('second',[AvgCallDuration])). Same with the decimal where you would also probably use the STR and ROUND functions to format it.
-
2. Re: Format issue while Swapping measures using parameters
MANOJ PRABHAKAR Dec 6, 2017 6:38 AM (in response to Andrew Watson)Hi Andrew,
this will give you an idea of what i have come up with as of now
1.call count measure is direct
2.avg call duration=[Total Duration]/[Call Count]
Total Duration measure is direct
3.mm:ss =[avg call duration]/86400
4.Placeholder 1=
CASE [Choose KPI]
WHEN "Call Count" THEN SUM([Call Count])
WHEN "Avg Call Duration" THEN AVG([mm:ss])
END
-
3. Re: Format issue while Swapping measures using parameters
MANOJ PRABHAKAR Dec 6, 2017 6:41 AM (in response to MANOJ PRABHAKAR)When i try this
CASE [Choose KPI]
WHEN "Call Count" THEN SUM([Call Count])
WHEN "Avg Call Duration" THEN str(DATEPART('minute',AVG([mm:ss]))) + ':' + str(DATEPART('second',AVG([mm:ss])))
END
i get this
Expexted type float , found string .Result types from case statement must match
-
4. Re: Format issue while Swapping measures using parameters
Andrew Watson Dec 6, 2017 6:46 AM (in response to MANOJ PRABHAKAR)Yes, both the call count and call duration would have to return a string. Hence the earlier point you'll need a calculation for Call Count using Round (to get the correct decimal places) and STR to convert to a string.
STR(ROUND(SUM([CALL COUNT]),2)) or something similar. I haven't tested any of the formulas by the way, just freestyling them :-)
-
5. Re: Format issue while Swapping measures using parameters
arvindgarg Dec 6, 2017 7:51 AM (in response to MANOJ PRABHAKAR)I would create two sheets and display one of them using the parameter.
Below URL might help you with this.