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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dwhittaker1
Helper II
Helper II

measure that Returns a blank value in a matrix table for a specific date

I would like to create a measure that calculates Actual Sales less Target Sales. but I would like that measure to return a blank value for the column 1/1/2026. Anyone have any thoughts on how I can return a blank value for 2/1/2026? see sample below

 

 

                  6/1/2025  7/1/2025  8/1/2025  9/1/2025  10/1/2025  11/1/2025  12/1/2025  1/1/2026
Target9090909020020010040
Actual8383838385899080
Difference100120110100100115120 
1 ACCEPTED SOLUTION
v-karpurapud
Community Support
Community Support

Hi @dwhittaker1 

Please try the below DAX:

 

SelectedMeasure =
VAR SalesActual = CALCULATE(SUM(Sales[Value]), Sales[Item] = "Sales Actuals")
VAR SalesTarget = CALCULATE(SUM(Sales[Value]), Sales[Item] = "Sales Target")
VAR Difference = SalesActual - SalesTarget

RETURN
    SWITCH(
        SELECTEDVALUE(MeasureTable[MeasureName]),
        "Sales Target", SalesTarget,
        "Sales Actuals", SalesActual,
        "Difference", IF(MAX(Sales[Month]) = DATE(2026,1,1), BLANK(), Difference),
        BLANK()
    )

If this post helps kindly mark it Accept as Solution. 

Thank You.

View solution in original post

7 REPLIES 7
v-karpurapud
Community Support
Community Support

Hi @dwhittaker1 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @dwhittaker1 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @dwhittaker1 

Please try the below DAX:

 

SelectedMeasure =
VAR SalesActual = CALCULATE(SUM(Sales[Value]), Sales[Item] = "Sales Actuals")
VAR SalesTarget = CALCULATE(SUM(Sales[Value]), Sales[Item] = "Sales Target")
VAR Difference = SalesActual - SalesTarget

RETURN
    SWITCH(
        SELECTEDVALUE(MeasureTable[MeasureName]),
        "Sales Target", SalesTarget,
        "Sales Actuals", SalesActual,
        "Difference", IF(MAX(Sales[Month]) = DATE(2026,1,1), BLANK(), Difference),
        BLANK()
    )

If this post helps kindly mark it Accept as Solution. 

Thank You.
v-karpurapud
Community Support
Community Support

Hi @dwhittaker1 

Could you please confirm if your query have been resolved the solution provided by @Karsurya12_03 & @pankajnamekar25 ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.

Thank you

@v-karpurapud  these solutions didnt resolve my issue unfortunately

 

Karsurya12_03
Helper I
Helper I

Hello @dwhittaker1 ,

Can you try this measure,

Result=if([Date column]=date(2026,1,1),Blank(),[Actual]-[Target])

 

Regards,

Sk

pankajnamekar25
Super User
Super User

Hello @dwhittaker1 

 

You can try this measure

Difference Measure =
VAR SelectedDate = SELECTEDVALUE('DateTable'[Date])
RETURN
IF(
SelectedDate = DATE(2026, 1, 1),
BLANK(),
CALCULATE(
SUM('Sales'[Actual]) - SUM('Sales'[Target])
)
)

 

Thanks,
Pankaj

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors