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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Too Many Arguments Q.

I am trying to write a measure that will allow me to filter on statuscode and Datesbetween. With the filter, plus the two conditions, I have too many arguments for the FILTER function. What syntax can I use to get the desired result?

 

 

Won-Existing = SUMX ( FILTER ( _enquiries, _enquiries[_GUID] = _2018_Budget[_GUID] &&

_enquiries[statuscode] = 866120005 &&

DATESBETWEEN(_enquiries[Date Contract Awarded],DATE(2018,8,1),DATE(2018,8,31) )

, _enquiries[Amount (Enq)] ))

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Maybe this one?

 

Won-Existing =
CALCULATE (
    SUMX (
        FILTER (
            _enquiries,
            _enquiries[_GUID] = _2018_Budget[_GUID]
                && _enquiries[statuscode] = 866120005
        ),
        _enquiries[Amount (Enq)]
    ),
    DATESBETWEEN (
        _enquiries[Date Contract Awarded],
        DATE ( 2018, 8, 1 ),
        DATE ( 2018, 8, 31 )
    )
)

Or this one?

 

 

Won-Existing =
CALCULATE (
    SUMX ( _enquiries, _enquiries[Amount (Enq)] ),
    DATESBETWEEN (
        _enquiries[Date Contract Awarded],
        DATE ( 2018, 8, 1 ),
        DATE ( 2018, 8, 31 )
    ),
    FILTER (
        _enquiries,
        _enquiries[_GUID] = _2018_Budget[_GUID]
            && _enquiries[statuscode] = 866120005
    )
)

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for trying, Dale.

 

The first one gives me this error:

 

A single value for column '_GUID' in table '_2018_Budget' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

The second one gives me this error:

 

A date column containing duplicate dates was specified in the call to function 'DATESBETWEEN'. This is not supported.

 

Any other thoughts. I appreciate all your help.

Hi @Anonymous,

 

Regarding the first one, what's the relationship between '_enquiries' and '_2018_Budget'? Maybe you can do it like this.

Won-Existing =
CALCULATE (
    SUMX (
        FILTER (
            _enquiries,
            _enquiries[_GUID] = min(_2018_Budget[_GUID])
                && _enquiries[statuscode] = 866120005
        ),
        _enquiries[Amount (Enq)]
    ),
    DATESBETWEEN (
        _enquiries[Date Contract Awarded],
        DATE ( 2018, 8, 1 ),
        DATE ( 2018, 8, 31 )
    )
)

Regarding the second one, please create a new date table and establish a relationship with '_enquiries'. Actually, the first one has the same issue. 

 

Can you share a dummy sample?

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.