Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

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.

 

riccardoprade93_0-1690897957750.png

 

Thanks who can help!

 

1 REPLY 1
amitchandak
Super User
Super User

@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
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.