March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
my slicer needs to be limited a particular listing of Issues (approx. 6-10 items) on open of the report/dashboard, but the user needs the option to reset the list the full list of issues (50 items). Is there a way to create dax that sets the value to the complete listing or turning off the full listing to the limit list via a button? with the Refresh of the data, sets it back to the defualt list?
Please point me into the right samples or link on web.
Thanks,
KFS
Solved! Go to Solution.
Hi @kfschaefer1,
One way to do this is (also attached PBIX file):
Hi @kfschaefer1,
One way to do this is (also attached PBIX file):
How do I add a new column, then edit the data to include the default Yes/No?
here is my first attempt:
DefaultSlicer = VAR DefaultYN = 'China Special Handling Request', 'Empty Box Received', 'Incorrect Product Received', 'Lost in Transit', 'Replacement SN Verification Request', 'Tamper/Damage Bypass Request', 'Tamper/Damaged Product Received' 'Wrong Item Received', 'SN Dosent Match Ticket' IssueDefaultSlicerIF('IssueDefaultSlicer'[ProjSubIssueListing]= DefaultYN,"Yes","No")
it does not like the variable, how do i include the list of default choices
Also tried using SWITCH function, but I am getting an error:
Function 'SWITCH' does not support comparing values of type True/False with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values
DefaultSlicer = SWITCH ( TRUE (), 'tblProjSubIssueListing'[ProjSubIssueListing]="China Special Handling Request",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Empty Box Received",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Incorrect Product Received",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Lost in Transit",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Replacement SN Verification Request",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Tamper/Damage Bypass Request",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Tamper/Damaged Product Received",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="Wrong Item Received",1,0, 'tblProjSubIssueListing'[ProjSubIssueListing]="SN Dosen't Match Ticket",1,0 )
The problem was that you included both 1 and 0 after the condition.
The 1st parameter of SWITCH function is the value you are trying to match. The 2nd is some expression. If that expression matches the 1st parameter, then the SWITCH function returns the 3rd parameter. Otherwise, it continues on - if the 4th matches the 1st , return the 5th, and so on. The final parameter is the return value if none of the previous expressions match the 1st parameter.
You could also rewrite the function like this, using the column value as the 1st parameter:
DefaultSlicer = SWITCH ( 'tblProjSubIssueListing'[ProjSubIssueListing], "China Special Handling Request", 1, "Empty Box Received", 1, "Incorrect Product Received", 1, "Lost in Transit", 1, "Replacement SN Verification Request", 1, "Tamper/Damage Bypass Request", 1, "Tamper/Damaged Product Received", 1, "Wrong Item Received", 1, "SN Dosen't Match Ticket", 1, 0 )
Hope this helps,
Nathan
Thanks for the Dax Switch code, I ended going with a nested IF Statement.
I am having a few issues with getting the buttons to work correctly.
what I am expecting is to have the slicer update with the appropriate list and also updating the Matrix based on the changes in the slicer. See Attach pictures.
All button
Default button
Here are are my current settings. Is there a way to set a default setting for the Default button on the filter to be set to "YES"?
Please help.
@kfschaefer1 - Could you share a screenshot of the Relationships between the tables?
Thanks for your assistance, I am still seeking a resolution for the Slicer/buttons being hidden and change the Slicers data based on the button selected.
@kfschaefer1 - Sorry for the delay. There are several issues, which each need to be addressed:
Hope this helps,
Nathan
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |