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 moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi All,
Did some researching on this but couldn't quite get the right answer. So figured I'd post this here.
Essentially I have year and sales data. (see below)
I want to create a new column, which for the years 2017-2035 just duplicates the sales data, but for the year 2016 I want to take a percentage of the 2016 sales data based on a parameter the user can control. I will call this the inclusion portion of 2016. The parameter is number of days in 2016 to include "0-365" then divided by 365 to get a percentage.
I tried this with a table calculation however I read that parameters do not work within table calculations and kept getting no result for 2016. I used the below DAX formula and syntax. but this gave me no result.
See below for my result
Any ideas how I would perform this calculation with a measure?
Please let me know if there is other data necessary to show to answer this question.
Regards
Solved! Go to Solution.
You should just have to wrap your [Year] portion in an aggregation like MAX to make that a measure as well as wrapping any other reference to a column in some type of aggregation like SUM or MAX depending on what you are trying to do.
@jdciaravino,
It seems that you are creating a calculated column rather than measure. Right click your table and select "New Measure", then apply the following DAX.
Measure = IF(MAX('SA SWS'[Year])=2016,MAX('SA SWS'[Sales])*'SA SWS'[Selectd Inclusion Value],MAX('SA SWS'[Sales]))
Regards,
Lydia
@jdciaravino,
It seems that you are creating a calculated column rather than measure. Right click your table and select "New Measure", then apply the following DAX.
Measure = IF(MAX('SA SWS'[Year])=2016,MAX('SA SWS'[Sales])*'SA SWS'[Selectd Inclusion Value],MAX('SA SWS'[Sales]))
Regards,
Lydia
You should just have to wrap your [Year] portion in an aggregation like MAX to make that a measure as well as wrapping any other reference to a column in some type of aggregation like SUM or MAX depending on what you are trying to do.
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 | |
| 31 | |
| 30 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 31 | |
| 23 | |
| 23 |