Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Cbishop
Frequent Visitor

SUM function issue with referencing columns

Hi all,

 

I have created the following measure in my report

 

ERF Lower Threshold Achievement = if('Measure Table'[ERF Actuals]>('Measure Table'[ERF Baseline]*0.7),if('Measure Table'[ERF Actuals]<('Measure Table'[ERF Baseline]*0.85),'Measure Table'[ERF Actuals]-('Measure Table'[ERF Baseline]*0.7),('Measure Table'[ERF Baseline]*0.85)-('Measure Table'[ERF Baseline]*0.7)),0)
 
However, I need to be able to change the *0.7 based on the following values which are month related
 
April = 0.7
May = 0.75
June = 0.8
July to March = 0.85
 
These values are in a column but when I try to reference this column in the formula I get the 'sum function only accepts a column reference' error
 
Can anyone help?
 
1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Cbishop 

 

Does it mean to use different multipliers according to different months?

Create an auxiliary table that contains the baseline values for all months.
Then use the month to establish a one-to-many relationship with the previous table, and use the RELATED function to create a new column. So you can use the sum function to refer to the new column.

vangzhengmsft_0-1624864784770.png

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
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

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Cbishop 

 

Does it mean to use different multipliers according to different months?

Create an auxiliary table that contains the baseline values for all months.
Then use the month to establish a one-to-many relationship with the previous table, and use the RELATED function to create a new column. So you can use the sum function to refer to the new column.

vangzhengmsft_0-1624864784770.png

Hope this helps.

 

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

selimovd
Super User
Super User

Hey @Cbishop ,

 

try to save the values in a variable before. That should solve your issue.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

hi selimovd,

 

many thanks for the response, however, I don't think this will work.

 

I believe you are referring to setting the values as a slicer and then using selectedvalue function

 

This would work when only looking at a specific month and making sure the correct value is selected within the slicer, however, when looking at the result of this calculation on a year to date basis I still need the months to be calculated using the correct month value

 

Thanks

 

Craig

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.