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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Tob_P
Helper V
Helper V

Variable Help

Hi there,

 

I have the following measure which I need to adapt to include a Measure in place of the Amount field in the Dyn_OpportunityProduct table..

 

Product Target Filtered Sales =
sumx (
    'tblRep_List',
    VAR BonusStartDate ='tblRep_List'[Product Bonus Start Date]
    RETURN
    CALCULATE(
        SUM('Dyn_OpportunityProduct'[Amount]),
        KEEPFILTERS(
            'CRM: Opportunity'[Date Spec Secured] >= BonusStartDate)))+0
 
It doesn't seem possible to drop the measure in when I omit CALCULATE ( SUM...
 
How can the DAX be amended to allow the Measure to be included?
 
Thanks in advance.
1 ACCEPTED SOLUTION
PaulOlding
Solution Sage
Solution Sage

Hi @Tob_P 

You could replace the SUM(...) with a measure.  That would give you

Product Target Filtered Sales =
sumx (
    'tblRep_List',
    VAR BonusStartDate ='tblRep_List'[Product Bonus Start Date]
    RETURN
    CALCULATE(
        [Your Measure],
        KEEPFILTERS(
            'CRM: Opportunity'[Date Spec Secured] >= BonusStartDate)))+0

 I'd suspect performance could be an issue if you have a sizable amount of data.

View solution in original post

3 REPLIES 3
PaulOlding
Solution Sage
Solution Sage

Hi @Tob_P 

You could replace the SUM(...) with a measure.  That would give you

Product Target Filtered Sales =
sumx (
    'tblRep_List',
    VAR BonusStartDate ='tblRep_List'[Product Bonus Start Date]
    RETURN
    CALCULATE(
        [Your Measure],
        KEEPFILTERS(
            'CRM: Opportunity'[Date Spec Secured] >= BonusStartDate)))+0

 I'd suspect performance could be an issue if you have a sizable amount of data.

amitchandak
Super User
Super User

@Tob_P , if you do calculation inside expression of sumx, you need calculate. else you can have like

 

measure = VAR BonusStartDate ='tblRep_List'[Product Bonus Start Date]
RETURN
CALCULATE(
SUM('Dyn_OpportunityProduct'[Amount]),
KEEPFILTERS(
'CRM: Opportunity'[Date Spec Secured] >= BonusStartDate))

Product Target Filtered Sales =
sumx (
'tblRep_List', [measure]
)+0

 

or

 

Product Target Filtered Sales =
sumx (
'tblRep_List', [Any measure]
)+0

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

 

Thanks for coming back to me. I'm afraid the first part of the suggestion will now work as writing...

 

measure = VAR BonusStartDate ='

 

....and this will only allow me to populate a Measure and not a table...

 

TobP8.png

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.