Forum Discussion

riccardoprade93's avatar
3 years ago

Filter Column in PowerBI Matrix visual by Measure filter

Hi guys,

 

it seems something relativtly basic in  my brain, you can filter rows without a problem by using the filter pane and a measure, but I was not able to filter the column by a measure, simply will not do anything.

 

I am looking at the measure DevMoM. It will calculate the variation between the figures in the column "Current CNS" - "Previous CNS", and for all the rest of the column will result in BLANK()

 

Dev MoM =
VAR Cur1 =
CALCULATE (
    SUM ( 'Current Cns'[QUANTITY] ),
    'Current Cns'[Source] = "Current CNS",
    FILTER ( ALL ( 'Analysis' ), 'Analysis'[Analysis] = "Current CNS" )
)
VAR Pas1 =
CALCULATE (
    SUM ( 'Current Cns'[QUANTITY] ),
    'Current Cns'[Source] = "Previous CNS",
    FILTER ( ALL ( 'Analysis' ), 'Analysis'[Analysis] = "Previous CNS" )
)
VAR PF2 = CALCULATE ( MAX ( 'Analysis'[Analysis] ) )
RETURN
IF (
    PF2 = "Actuals 2022" || PF2 = "Budget 23 R3" || PF2 = "Base Fcst WD7"|| PF2 = "Consensus Lag0" || PF2 = "Next 12M",
    BLANK(),
    IF(PF2 = "Previous CNS",0.001,Cur1 - Pas1)
)

 

I don't understand why the columns don't get filtered out when I tell DevMoM <>Blank or greater than 0 or lower than 0.

 

 

Thanks who can help!

 

1 Reply

  • riccardoprade93 , Based on what I got try like

     

    IF (
    PF2 = "Actuals 2022" || PF2 = "Budget 23 R3" || PF2 = "Base Fcst WD7" || PF2 = "Consensus Lag0" || PF2 = "Next 12M" || PF2 = "Previous CNS",
    BLANK(),
    Cur1 - Pas1
    )