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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Marcos_Noguer
New Member

Filter a card by two dates

Hi everyone,

 

I need to filter a card by a date. The card has a mesure that calculates how many products are sold every day divided by the open shops of that day. 

UDLs = SUM('PRODUCT_MIX_RVC'[CANT_TRX])/SUM('Open shops'[Count])
 
What i want is to show the evolution in UDLs of the new products. So I have a table that hast de product id and the launch date of that product. The card has to show the UDLs the first day, another with the first week, first month, etc
 
What i have:
Marcos_Noguer_0-1654714924938.png

 

What i want:

 

Marcos_Noguer_1-1654714974776.png

 

So 'New Products[Launch date]' has to filter 'Open shops'[Date]' in the card.

 

Thank you!

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Marcos_Noguer ,

 

If your tables are like this:

vjianbolimsft_0-1657094911473.png

 

You can create three different cards to achieve your purpose, here is the DAX:

 

UDLs(first day) =
CALCULATE (
    DIVIDE ( SUM ( 'PRODUCT_MIX_RVC'[CANT_TRX] ), SUM ( 'Open shops'[Count] ) ),
    FILTER ( 'Open shops', [Date] = MAX ( 'New Products'[Launch date] ) )
)

UDLs(first week) =
CALCULATE (
    DIVIDE ( SUM ( 'PRODUCT_MIX_RVC'[CANT_TRX] ), SUM ( 'Open shops'[Count] ) ),
    FILTER ( 'Open shops', [Date] = MAX ( 'New Products'[Launch date] ) + 7 )
)

UDLs(first month) =
CALCULATE (
    DIVIDE ( SUM ( 'PRODUCT_MIX_RVC'[CANT_TRX] ), SUM ( 'Open shops'[Count] ) ),
    FILTER (
        'Open shops',
        MONTH ( [Date] )
            = MONTH ( MAX ( 'New Products'[Launch date] ) ) + 1
            && DAY ( [Date] ) = DAY ( MAX ( 'New Products'[Launch date] ) )
    )
)

 

Final output:

vjianbolimsft_1-1657094911476.png

 

vjianbolimsft_2-1657094911478.png

 

If it isn't your expected output, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

Anonymous
Not applicable

Hey in this case, you need to hardcode measures for your card. Otherwise, the filter will apply to page visuals.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors