Hi all,
Sorry if this subject has already been up, but I dont know what terms or keywords I should search for. Please redirect me to the right one if it already has.
Im trying to find a method to hide “-100%” values if dates/years that dont have any data. See the two measure examples below.
What I would like to use
Δ %Rev LY = DIVIDE( [Sales] , [Sales LY Until Today] , BLANK() )
With the result looking like this
but ending up like this:
What I use now, but think is a mess and does the trick:
Δ %Rev LY =
IF (
OR ( ISBLANK ( [Sales] ), ISBLANK ( [Sales LY Until Today] ) ),
BLANK (),
DIVIDE( [Sales] , [Sales LY Until Today] , BLANK() )
)
Is there some other way to write the code with less ISBLANK, OR and BLANK() ?
Hi!
You can use the function
`∆ % AOV Bud MKtg = IF (
[Sales LY Until Today] = 0, Blank(),
DIVIDE([Sales],
[Sales LY Until Today], blank())
This will ignore the elements that have no data in the measure of last year. But in an analytical point of view, I think there’s no wrong with the -100%. Anyway, try this function.
I agree completely that ISBLANK makes things more difficult to read and interpret than this alternative construct, for say your OR/ISBLANK construct above:
X = BLANK() ||
Y = BLANK()
where depending on context, X and Y could be variables, columns, SELECTEDVALUE(), measures.
Here’s a forum post that might be helpful/relevant:
If you want a more specific revision, please post your PBIX.