Forum Discussion
Use Filter in DAX and Add a field parameter
I have a table containing loans, loan types and different value fields. I have created a graph visual which shows loans in the x-axis and field parameter (consists of value fields) in the y-axis. I need to add one more slicer for filtering the visual based on the loan type. So instead of adding direct slicer using the loan type field, is it possible to add two measures using filter function and creating a field parameter?
dax v-yuta-msft
3 Replies
- mohghRegular Visitor
Hope this could helps you out:
SelectedLoanTypeMeasure =
SWITCH (
SELECTEDVALUE('YourSlicerTable'[SelectedLoanType]),
"Type1", [LoanType1Measure],
"Type2", [LoanType2Measure],
BLANK()
) - AnonymousNot applicable
Hi archana_c ,
In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?
Thanks for your efforts & time in advance.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- archana_c
Helper I
hi Anonymous
Suppose this is the data containing 6 columns. One participant can have more than one loan. I have created a stacked chart with participant in x-axis and field parameter as Y-axis. Field parameter column amount columns. And loans are added as series in the bar chart. So the new requirement is to add one more slicer loan type. The values in the dropdown are Exclude abl, Include abl. When exclude abl is selected we should not consider loans with loa type=abl, where as include abl means we need to consider all the loans. Normal slicer wont work in this case. So there will require some DAX for including and excluding the values.
Any help is accepted.
Thanks in advance