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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Query parameters filter another column

hello everyone,

 

i have a transaction table which has transaction ID, transaction date, account date and some other fields.

what i need to do is create two query parameter on transaction date  [start date and end date]. When the user gives a start date and end date, the report should display transaction IDs only for the last account date of the months in the given range.

For example,

i have given start date as 21 Dec 2018

and end date as 3rd March 2019

 

the report should display transactions only for

31st Dec 2018

31st Jan 2019

28th Feb 2019

31st March 2019

 

is this possible? please help

 

thanks in advance

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @Anonymous 

You may create a measure like below.Then use it in visual level filter.Attached sample file for your reference.

Measure = 
VAR E_account_date =
    ENDOFMONTH ( Table1[account date] )
VAR E_start_date =
    ENDOFMONTH ( 'Start date'[Start Date] )
VAR E_end_date =
    ENDOFMONTH ( 'End date'[End Date] )
RETURN
    IF (
        MAX ( Table1[transaction date] ) >= MAX ( 'Start date'[Start Date] )
            && MAX ( Table1[transaction date] ) <= MAX ( 'End date'[End Date] ),
        IF (
            MAX ( Table1[account date] ) = E_account_date
                && MAX ( Table1[account date] ) >= E_start_date
                && MAX ( Table1[account date] ) <= E_end_date,
            1
        )
    )

Regards,

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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