The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi, I have a slicer which has a table of field parameters. I have a situation, that in a particular case, I want to show additional fields on the field parameter when a specific value is selected ( in my code below, a selected company code) I.E when that company code is selected there are 6 field parameters , otherwise only 4. I have tried this using a simple IF statement and also with Switch. I get the same error - Expression refers to multiple columns. Multiple columns cannot be converted to scalar values. I understand I'm trying to return a table, thats what i want to do.
Is there any method to have the table return in the DAX. I'm assuming not, but just in case there's a means of doing this.
I'm trying to do the exact same thing. My code looks very much similar to this. Select 4 paramerts if "Yes" is selected in one of the slicers, or select 6 parameters. Using this paramet in the table cloumns. Table will show either 4 or 6 columns depending on what is selected in the slicers. It looks so simple, but IF and SWITCH do not work, it gives me the same erros. I wish it worked, would have been amazing to do such conditional displaying of columns and parameters. Tried many things, no luck.
Did you ever solve this looking to do the same thing?
I didn't solve the issue in this particular way. And designed my report in a different manner. However, I recently seen a Video by Bas on How to Power BI, which uses Disconnected tables and some measures, to determine which Items to show in a slicer which would have worked for my use case.
https://youtu.be/NqlgTXCfqSs?si=COG1C6YbFIlVIMoP
Thanks for sharing. I was able to use the logic in this video to achieve what I needed. Only thing it got much complicated, would have been so simple if IF or SWITCH worked in the DAX for parameter.
@jjkiernanNGDS , if you need selected value, I explained that in community webinar and shared the file in one of the comment
This blog also have the code
https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Thanks for coming back, however i am trying to make the Field Parameters Dynamic using a standard selected slicer value, I'm not trying to find selected Field Parameter value either.
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |