Forum Discussion
Formula Problem : IFHASONEVALUE, VALUES, CALCULATING SPEND WITH DIFFERENT TYPES OF COSTS
The results is a error message or an incorrect value?
- hacksign10 years agoRegular Visitor
The result for Tenancy is an empty cell, while for the other types of costs, it works perfectly.
- Anonymous10 years agoNot applicable
A bit hard to say with what is given. I would break this out a bit just to help debug.
Maybe define a measure for AVERAGE('Media Plan'[Costing]) and throw that + [FT Impressions Delivered] broken out by [Cost Method] into a table... just to see if the values are "what you expect" ?
You measure generally looked fine to me, modulo lots of parens and zeros :)
=IF (HASONEVALUE ( 'Media Plan'[Cost Method] ), IF (VALUES ( 'Media Plan'[Cost Method] ) = "Tenancy" && [FT Impressions Delivered] > 500, AVERAGE ( 'Media Plan'[Costing]), 0 ) )
- hacksign10 years agoRegular Visitor
Anonymous hah, yes, the parenthesis part is a bit too much. I will try to put the Average in a measure
Do you or Vvelarde have any idea on how to solve the second part of the puzzle, that is, make sure that it calculates everything on a weekly basis? What I think it would have to do, is some kind of SUMX that calculates every item every seven days from the start of the calendar? Or is there any way I can use the Week Number?