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
MartySapp
Frequent Visitor

Parameter to Change a Date

Have serached and can't seem to find a solution to this-

 

I have a date of an invoice and want to add some what if analysis to changes to average payment terms.

 

i thought i coudl use a parameter to do this, by creating a average payment term Parameter adjustment that starts at 15 and goes to 120

This was my thinking to get an Expected payment Date 

Payment Term Extender Value =
VAR  DaystoAdd = SELECTEDVALUE('Average Payment Term Extender'[Payment Term Extender])
VAR TotalFCAPP = [Total Forecast + Actual Base]
RETURN
CALCULATE('YTD Information'[Date],DATEADD('YTD Information'[Date],DaystoAdd,day))


but get this error

A single value for column 'Date' in table 'YTD Information' 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..

 

Alternativly i gues i could power query multiple new columns i.e +15 days +30days etc filter them on the visual.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @MartySapp,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

BTW, you can also try to use the following measure formula if helps:

Payment Term Extender Value =
VAR currDate =
    MAX ( 'YTD Information'[Date] )
VAR DaystoAdd =
    MAX ( 'Average Payment Term Extender'[Payment Term Extender] )
RETURN
    CALCULATE (
        [Total Forecast + Actual Base],
        FILTER (
            ALLSELECTED ( 'YTD Information' ),
            [Date] >= currDate
                && [Date] <= currDate + DaystoAdd
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @MartySapp,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

BTW, you can also try to use the following measure formula if helps:

Payment Term Extender Value =
VAR currDate =
    MAX ( 'YTD Information'[Date] )
VAR DaystoAdd =
    MAX ( 'Average Payment Term Extender'[Payment Term Extender] )
RETURN
    CALCULATE (
        [Total Forecast + Actual Base],
        FILTER (
            ALLSELECTED ( 'YTD Information' ),
            [Date] >= currDate
                && [Date] <= currDate + DaystoAdd
        )
    )

Regards,

Xiaoxin Sheng

some_bih
Super User
Super User

Hi @MartySapp your issue is probably in this part

CALCULATE('YTD Information'[Date],DATEADD('YTD Information'[Date]

part 'YTD Information'[Date] should be something SUM (some table[some column]) and similar

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






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.