Forum Discussion
Sum dynamic parameter fields multiple selected parameter
- 10 months ago
Hi bjackson2760 ,
Thank you for reaching out to the Microsoft Community Forum.
I have created sample data . Please refer below snap.
Please refer below output snap and attached PBIX file.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi bjackson2760
I am assuming those field parameters are derived from a measure. Field parameters are essentially still individual measures which visibility is determined by a slicer selection. You will need to write a very long conditional measure to return the sum of values being selected. For example:
VAR _order =
SELECTEDVALUE ( prametertable[field order] )
RETURN
SWITCH (
TRUE (),
_order = 1, [measure 1],
_order IN { 1, 2 }, [measure1] + [measure2],
_order IN ...
)
So you can imagine how long the formula would be to account for all the possible combinations.
Instead of a filed parameter, I would go for a disconnected table approach which may not be easier to setup but makes the summation of selected fields easier.
If you want more help, please read this:
Following the instructions will make it easier for anyone in the community to help you.
Hello Dane, and thank so much for responding. I do not like asking for help, and it took me a while to do so. I like to try and figure things out for myself, but its been 3 weeks and I said well its that time.
The columms are derived from an Excel spread sheet that I've tried to do so many different ways. So it is started off with tabs labeled "Jan - Dec", and the columns are Jan thru Dec within each tab. So when I brought them in they are columns and then for each I created parameters.
Then I couldn't figure out how to make it work that way so then I have another file with all columns merged to one file (Jan - Dec tabs) in hopes of it working that way. Same issue, I just can't figure it out. Also, yes, I agree with the formula could go on for days, because instead of asking for the "field parameters" it was expecting columns which as you mention would be a very long conditional measure.
Thanks for the information, I will try that and get back to you!