This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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 representing. It could be anywhere from one month to 24 months of data. I don't need to create a new date field, but I would like to create a Parameter or filter that divides the total by the number of months.
So, if I create a table showing total dollars by Country Code, with the totals at the bottom, by applying the Parameter or Filter called number of months, let's say in this example it is "6", the row totals and grand total for Total Dollars will be divided by six.
Solved! Go to Solution.
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.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Thank you. I am using this as a filter on a report so creating the new measure worked.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 26 | |
| 25 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 32 | |
| 25 | |
| 23 |