cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
briodan
Frequent Visitor

using multiple parameters in calculation

I have a requirement I'm not sure how to implement.

We have a table of devices we need to upgrade to a new software version. however, each location will be able to upgrade a different number of devices in one week. I need to be able to run what-if scenarios where I increase/decrease the number of upgrades in a city but keep the others constant to get estimates on how long it will take to upgrade each location.

 

this is a simplification of my data:

locationdevice serial number
NY123
LA124
NY134
LA345
HOU367

 

using the serial number to get a count of devices in each location

 

my thought is that I would create a parameter for each location and then use those parameters in a calculation,

Each parameter would have a value from 1 to 5 for example in 1 increments.

 

But I'm not sure how to properly filter the results for to get a table result like the following

LocationDevicesDevices/WeekWeeks
NY100520
LA210453
HOU150350

 

where via a slicer i can change the number of devices per week in NY alone.

in pseudo code I imagine this to look something like this:

if location = NY then divide Devices by "NY Devices/Week parameter"

elseif location = LA then divide Devices by "LA Devices/Week parameter"

else divide Devices by "HOU Devices/Week parameter"

 

but not sure how to translate that into DAX.

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-yuezhe-msft
Moderator

Re: using multiple parameters in calculation

@briodan,

Please check if what-if parameter and DAX in the attached PBIX file returns your expected result. If not, please describe more details about the week parameter and how you get the second table based on the first table.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Moderator v-yuezhe-msft
Moderator

Re: using multiple parameters in calculation

@briodan,

Please check if what-if parameter and DAX in the attached PBIX file returns your expected result. If not, please describe more details about the week parameter and how you get the second table based on the first table.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors