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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Tob_P
Helper V
Helper V

Filtering on amount >=

I have been working off a piece of DAX that I used previously whereby I only wanted to show sales after a certain date which worked well and wanted to adapt it so that only sales after a certain amount where shown. Here's the DAX...

 

Product Target Filtered Sales (MSM Amount) =
sumx (
    'tblProductTargets',
    VAR BonusStartAmount ='tblProductTargets'[Start Amount]
    RETURN
    CALCULATE(
        sum('Nav_Sales History MASTER'[Amount (LCY)]),
        KEEPFILTERS(
            'Nav_Sales History MASTER'[Amount (LCY)] >= BonusStartAmount)))+0
 
To test it out, I reset the [start amount] to zero, fully expecting to see the full amount but get this result...
 
TobP4.png
 
Is there a reason why this would work on dates, but not on amounts? I thought it would be fairly straightforward.
 
Thanks
6 REPLIES 6
Tob_P
Helper V
Helper V

@johnt75Thanks for the suggestion. I'll give that a go and see if anything comes up!

Hi @Tob_P ,

 

Have your questions been resolved and can you share them?

 

Best regards.

@ChenwuZhu_Gmail 

 

I'm afraid not - still looking for a solution. Nothing flagged up in Performance Analyser and there is a direct relationship between Sales History and Target

johnt75
Super User
Super User

If [Amount (LCY)] is a measure rather than a column I think you will need to use the FILTER function rather than just passing it as a parameter to CALCULATE. Without the FILTER iterator it has no row context in which to evaluate the measure

Hi @johnt75 - Thanks for coming back to me. It's a column, not a measure.

 

Then the problem would seem to be in other filters which may be being applied. Is there a relationship from the targets table to sales history?

A good way to see which filters are being applied to a visual is to get the DAX code generated for it from Performance Analyzer and look at that in DAX Studio. Might point you in the right direction

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.