Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Using Parameter to Divide

Hello   I have some raw data sent to me where there are no date fields. It has Country Code and Total Dollars. The person sending me the data will tell me the number of months the data is represent...
  • AllisonKennedy's avatar
    6 years ago

    Are you wanting to do this as a filter in the report or the Power Query stage? If in the report you'll need to use a MEASURE to be able to reference the SELECTEDVALUE of the slicer, but I feel like this might be better done in the Power Query stage? 

    Here's the Measure solution:

    Total Dollars MEASURE = DIVIDE( SUM(Table[Total Dollars]), SELECTEDVALUE(Parameter[NumberMonths], 1))

     

    How often are you sent this data and is it being combined into one report? 

     

    Have you worked with Parameters in Power Query before? Here's an intro you can follow along with on how they work,

    Use Parameters to Combine Data 

     

    Your requirement is slightly different, but same concept. Depending on how you combine and work with this data, the exact solution will vary so if you can provide a bit more info we can provide a better solution.