Forum Discussion
Anonymous
7 years agoNot applicable
Measure and filtering problem
Hi, I have created a measure to calculate the discount between two values, but when I put it in a table, it shows all the record (it seems to ignore the filters), but it shows blanks in the colum...
- 7 years ago
Hi, A minor update to Anonymous's solution.
Discount = IF(ISBLANK(SUM([Gross Price])), BLANK(), 1 - DIVIDE(SUM([Net Price]),SUM([Gross Price])))
See if that helps.
Anonymous
7 years agoNot applicable
I tried to put a ISBLANK([gross price]) control, but it gave me an error due to the fact that a measure can't refer to a single value or something like that. I did read something about converting it from measure to column, but it would lose the function I was looking for.
I want to add a detail: in the report I'm making, I already filtered out some fields (customer and type of item sold), and the only thing that seems to not filter the measure is the "year", which is filtered from a Date table connected to the main table.
tarunsingla
7 years agoSolution Sage
Hi, A minor update to Anonymous's solution.
Discount = IF(ISBLANK(SUM([Gross Price])), BLANK(), 1 - DIVIDE(SUM([Net Price]),SUM([Gross Price])))
See if that helps.