Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a 10 column table with some dimensions and some measures. Globally I only want to show the rows where the below calculation is = true . The below Calculation is one of my measure columns.
I am looking for examples.
if(SUM(B_BH_AMOUNT_ACT +
B_BH_AMOUNT_PAY +
B_BH_AMOUNT_GLA +
B_BH_AMOUNT_GLL +
B_BH_AMOUNT_GLQ +
B_BH_AMOUNT_GLR +
B_BH_AMOUNT_GLE +
B_BH_AMOUNT_OTHER)
>
Sum(B_BH_AMOUNT_ACC), 'true', 'false')
Thanks
I got it working! =Aggr(if($(vSpend)=1,MasterKey),MasterKey)
I need to filter the rows off the master key!
AutoNumber((B_BUSINESS_UNIT) & '_'& (B_PROJECT_ID)) as MasterKey,
if(SUM(B_BH_AMOUNT_ACT +
B_BH_AMOUNT_PAY +
B_BH_AMOUNT_GLA +
B_BH_AMOUNT_GLL +
B_BH_AMOUNT_GLQ +
B_BH_AMOUNT_GLR +
B_BH_AMOUNT_GLE +
B_BH_AMOUNT_OTHER)
>
Sum(B_BH_AMOUNT_ACC), YourMeasure)
I get Invalid Dimension using
=if(SUM(B_BH_AMOUNT_ACT +
B_BH_AMOUNT_PAY +
B_BH_AMOUNT_GLA +
B_BH_AMOUNT_GLL +
B_BH_AMOUNT_GLQ +
B_BH_AMOUNT_GLR +
B_BH_AMOUNT_GLE +
B_BH_AMOUNT_OTHER)
>
Sum(B_BH_AMOUNT_ACC), 'True')
maybe i am placing the formula in the wrong place. Where does the above script need to be located?
You would need to use the code in your measure
If(condition, measure)
I understand, you want to show measures where your condition is true. Let's say the measure you want to show is sum(B_BH_AMOUNT_ACT) then, in your measure field, you would write:
if(SUM(B_BH_AMOUNT_ACT +
B_BH_AMOUNT_PAY +
B_BH_AMOUNT_GLA +
B_BH_AMOUNT_GLL +
B_BH_AMOUNT_GLQ +
B_BH_AMOUNT_GLR +
B_BH_AMOUNT_GLE +
B_BH_AMOUNT_OTHER)
>
Sum(B_BH_AMOUNT_ACC), sum(B_BH_AMOUNT_ACT))
Which means, when the condition is met (i.e. when your original condition evaluates to true), show the data
Oh so I would do that for each column, within Show Column if?
yes, for each measure. I would recommend to create a variable with your condition (if it's the same across all the measures) and reference that variable instead (it avoid re-writing the code and makes it easier to manage if you need to make any changes)