The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a number of slicers on my report, too many to show on the report so have created a slicer pane to hide the slicers when not required. The problem with this is that when the slicer pane is hidden you can't tell what has been selected on the report.
To try to solve this I have created a small text box that dynamically shows what has been selected in the slicers.
e.g.
'Hidden filters selected - Academic Years - 2023/4, Domicile - All, Fee Status - All'
I can produce this with variations of VAR variables and CONCATINATEX(...).
I have got it to work for Parameter slicers, but not for Parameter Slicer Values.
Char F below will show the characteristics selected
e.g.
Return CharF
But I'd like to now how to get a version to work to show what selected paramter value has been selected.
e.g Parameter - Sex , Paramteter Value - Male
Solved! Go to Solution.
I found a solution to extract the slicer select values of a Parameter as well as the Paramters.
I did more than this to cover multiple options of results, but below covers the basic value extraction using the source table used to build the Parameter.
Filter Text =
// Parameter Slicer Selection
VAR CList =
CONCATENATEX('Parameter',
'Parameter'[Parameter Order],
", "
)
//Slicer selection of Parameter Field Values using Source Table//
VAR A = if(isfiltered('Table'[Table Field]),"Text" & CONCATENATEX(Filters('Table'[Table Field]),[Table field], ","), blank())
VAR B = as above for next Parameter Field entry
VAR C = as above for next Parameter Field entry
.....
VAR FiltersApplied =
IF (A & B & C & D & ..... = BLANK (),
"Text" & CList & "Text",
"Text" & A & B & C & D & ..... )
RETURN
CListFiltered
Hi @not_sure ,
Is this issue solved now? If you have any questions, please feel free to share with us.
And don't forget to accept the answers if they helped. Your action would be helpful to other users who encounter the same issue and read this thread. 🙂
You could follow the steps in the article to provide example data or sample files here if you have any confused. We could offer you more help if we have information in detail. And what you expect the output to be. There is sensitive data that can be removed in advance. How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Thanks for your understanding. Your time and cooperation are much valued by us. We are looking forward to hearing from you to assist further.
Best regards,
Lucy Chen
Meaure:
SelectedFilters =
VAR CharList =
CONCATENATEX(
VALUES('Characteristic Parameter - Awarded'[Characteristic Parameter Order]),
'Characteristic Parameter - Awarded'[Characteristic Parameter],
", "
)
VAR ParamList =
CONCATENATEX(
VALUES('Parameter Value Table'[Parameter Name]),
'Parameter Value Table'[Parameter Name] & " - " & SELECTEDVALUE('Parameter Value Table'[Parameter Value]),
", "
)
VAR FinalChar =
IF(
CharList = "Sex, Ethnicity, Ethnicity Detailed, Disability, Age, POLAR4 Quintile, IMD Quintile, Domicile, Region, Parent HE Educated, Welsh Speaking",
"Characteristic - All",
"Characteristic - " & CharList
)
VAR FinalParam =
IF(
ISBLANK(ParamList),
"No Parameter Values Selected",
"Parameter - " & ParamList
)
RETURN
FinalChar & " | " & FinalParam
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
The parameter value slicer can show the selected values, so it should be possible to identify the values from the multiple columns.
Try a measure using this pattern:
Selected Parameter Values =
CONCATENATEX (
SUMMARIZE ( Parameter, Parameter[Parameter], Parameter[Parameter Fields] ),
Parameter[Parameter],
", "
)
Proud to be a Super User!
Thanks for the suggestion, but it doesn't like turning mulitple columns into a scalar.
Would you provide your DAX?
Proud to be a Super User!
I was hoping to find an alternative to looking in every column individually due to the number, but this is what I have so far. VALUES don't work.
Character Filters =
VAR CList = "Characteristic - " &
CONCATENATEX('Characteristic Parameter - Awarded',
'Characteristic Parameter - Awarded'[Characteristic Parameter Order],
", "
)
VAR Gen =CONCATENATEX(
DISTINCT('Awarded'[Gender]),'Awarded'[Gender],
","
)
VAR Eth =CONCATENATEX(
DISTINCT('Awarded'[Ethnicity]),'Awarded'[Ethnicity],
","
)
VAR EthG =CONCATENATEX(
DISTINCT('Awarded'[Ethnicity Group]),'Awarded'[Ethnicity Group],
","
)
VAR Dis =CONCATENATEX(
DISTINCT('Awarded'[Disability Group]),'Awarded'[Disability Group],
","
)
VAR Age =CONCATENATEX(
DISTINCT('Awarded'[Age]),'Awarded'[Age],
","
)
VAR POL =CONCATENATEX(
DISTINCT('Awarded'[POLAR4 Quintile]),'Awarded'[POLAR4 Quintile],
","
)
VAR IMD =CONCATENATEX(
DISTINCT('Awarded'[IMD Quintile]),'Awarded'[IMD Quintile],
","
)
VAR Dom =CONCATENATEX(
DISTINCT('Awarded'[Domicile UK/Non-UK]),'Awarded'[Domicile UK/Non-UK],
","
)
VAR Reg =CONCATENATEX(
DISTINCT('Awarded'[Region.Region]),'Awarded'[Region.Region],
","
)
VAR PDEg =CONCATENATEX(
DISTINCT('Awarded'[Parents with Degree]),'Awarded'[Parents with Degree],
","
)
VAR WS =CONCATENATEX(
DISTINCT('Awarded'[Welsh Speaker Indicator]),'Awarded'[Welsh Speaker Indicator],
","
)
Var CategoryChar = SWITCH (
SELECTEDVALUE ( 'Characteristic Parameter - Awarded'[Characteristic Parameter Order] ),
"Sex", Gen,
"Ethnicity", Eth,
"Ethnicity Detailed", EthG,
"Disability", Dis,
"POLAR4 Quintile", POL,
"IMD Quintile", IMD,
"Age", Age,
"Domicile", Dom,
"Region", Reg,
"Parent HE Educated",PDeg,
"Welsh Speaking", WS,
BLANK ()
)
Return CategoryChar
It doesn't work for multiple parameter selections or 'All' yet and I haven't combined it with CList.
Would you confirm if you're using field parameters (my solution is for field parameters)? Now that I've seen your DAX, I believe you're actually referring to slicers based on a column. Based on your example result, it seems 1) you want each parameter (slicer) field to appear in the text box, followed by either the selected values of that field or "All", and 2) if no values are selected in any slicer, display "Characteristic - All". Would you provide the data in 'Characteristic Parameter - Awarded' and 'Awarded'?
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
Proud to be a Super User!
I can't provide the data but yes, that is what I was attempting to achieve.
I found a solution to extract the slicer select values of a Parameter as well as the Paramters.
I did more than this to cover multiple options of results, but below covers the basic value extraction using the source table used to build the Parameter.
Filter Text =
// Parameter Slicer Selection
VAR CList =
CONCATENATEX('Parameter',
'Parameter'[Parameter Order],
", "
)
//Slicer selection of Parameter Field Values using Source Table//
VAR A = if(isfiltered('Table'[Table Field]),"Text" & CONCATENATEX(Filters('Table'[Table Field]),[Table field], ","), blank())
VAR B = as above for next Parameter Field entry
VAR C = as above for next Parameter Field entry
.....
VAR FiltersApplied =
IF (A & B & C & D & ..... = BLANK (),
"Text" & CList & "Text",
"Text" & A & B & C & D & ..... )
RETURN
CListFiltered
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |