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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.