Forum Discussion
IF Function Assistance
- 4 years ago
Hi DJsummers
Use SUMX instead of SUM
New Target = IF('CumulativeWeightsView2'[ParentAge]<35, SUMX('CumulativeWeightsView2', 'CumulativeWeightsView2'[StandardWeight]*0.95))Regards
Phil
Hi DJsummers
Thanks for the data but it's not made things any clearer I'm afraid. When I look at Housename 1 (is this supposed to be the same as Housename 01?), on Standard Day 10, the Max Record Weight is 0.38 (your image shows 0.29), and the Avg Parent Age I see is 43.74 (your image shows 29). So I'm not sure if I've got the same data as you??
I don't think I fully understand what it is you are trying to do. You say that you'd expect to see 0.305 as the Target for Day 10 - why? How do you calculate that?
In your initial question you said I have a Standard Weight and a Parent Age - but the image shows Max of Standard Weight and Average Parent Age.
Can you please rewestate what it is you are tryinmg to do and show the expected result.
Please use the PBIX file I linked to above which contains the data you sent me. You'll need to change the Source step to load from an XLSX file on your PC.
Regards
Phil
- DJsummers4 years agoHelper I
PhilipTreacy Apologies for the late response, I really appreciate the help you have been. I've accepted your first answer as the solution as it actually resolved what I was asking originally! I have since found that there is an issue with my SQL View which isn't showing the latest Parent Age, it was adding all the Parent Ages together since the history of time so that's why it wasn't showing the result I was expecting.
Anyway! Hope you're having an excellent Day.
Dan