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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

date as input and use in calculate Dax measure

Hi All,

I have to get start date and end date of return date id as user input and use them inside the dax measure. But when i put this measure inside the table i have, it should not change the other values in the table. Only this measure values should be changed.
note: if i use slicer of return date id and use it, the other column values are changing , if i off the edit interaction , the measure is not working. Hope you guys help.

net returned = CALCULATE(

    SUM('UW fact'[net_premium]),
     'UW fact'[return_date_id] > DATE(2023,01,01),
    'UW fact'[return_date_id] < DATE(2023,06,01)
)

Thanks for your help,
Bala
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

I’d like to suggest you create an unconnected date table(does not have relationship to raw table) as source of slicer. It should not interact with raw table fields, and you can use Dax expression to extract the filter selections.

net returned =
VAR selectedMin =
    MIN ( newTable[Date] )
VAR selectedMax =
    MAX ( newTable[Date] )
RETURN
    CALCULATE (
        SUM ( 'UW fact'[net_premium] ),
        FILTER (
            ALLSELECTED ( 'UW fact' ),
            'UW fact'[return_date_id] > selectedMin
                && 'UW fact'[return_date_id] < selectedMax
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

I’d like to suggest you create an unconnected date table(does not have relationship to raw table) as source of slicer. It should not interact with raw table fields, and you can use Dax expression to extract the filter selections.

net returned =
VAR selectedMin =
    MIN ( newTable[Date] )
VAR selectedMax =
    MAX ( newTable[Date] )
RETURN
    CALCULATE (
        SUM ( 'UW fact'[net_premium] ),
        FILTER (
            ALLSELECTED ( 'UW fact' ),
            'UW fact'[return_date_id] > selectedMin
                && 'UW fact'[return_date_id] < selectedMax
        )
    )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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