Forum Discussion
Return multiple variables
- 4 years ago
No problem, it's just because normally it's easier to help with the pbix file.
From what i understood you what someting like this:
If yes you will need to group the values and use that in the slicer:
If you don't know how to create those bins, you can do it easily in Power Query:
With 126 values it's a little time consuming but it can be done!
Regards,
Sérgio Silva
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Hi Seanan ,
Do you have an pbi file with an example? So it's clearer for us to understand what you need to achieve...
To return the two variables that you created you can use the following:
Split Assessment Type =
var _P1 = LEFT('AssessmentType_NameLocalizations'[Value],SEARCH("P1",'AssessmentType_NameLocalizations'[Value],1,LEN('AssessmentType_NameLocalizations'[Value]))+1)
var _P4 = LEFT('AssessmentType_NameLocalizations'[Value],SEARCH("P4",'AssessmentType_NameLocalizations'[Value],1,LEN('AssessmentType_NameLocalizations'[Value]))+1)
return
_P1 & " " & _P4
But i think this isn't your problem.
Regards,
Sérgio Silva
Thanks for the response.
Unfortunately as the PBI file contains sensitive data I am unable to send it over, so I apologise for that.
I'll try to explain it a little better so that hopefully it is clear what I need to achieve.
I have a slicer that currently contains 126 options, for example P1 Voice 1, P1 Voice 2, P1 Voice 3 and P1 Voice 4. I'd like to group all of the P1, P4, P7 and S3 voices to just display P1, P4, P7 and S3 in the slicer (but still return all of the data for Voice 1 to Voice 4).
Does this help clarify a bit better?