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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
QuentinRijkers
Frequent Visitor

Cross filter report page based on measure selection

Hello PB Comunity,

This is my first question ever. Hopefully you DAX geniuses can help me out here.

I have a measure counting the new customers:

 

Count new customers = 
VAR CustomersWithNewDate =
    CALCULATETABLE (
        ADDCOLUMNS (
            VALUES ( 'Sale invoices'[customer_id] ),
            "@NewCustomerDate", [Sale invoices - First date by partner]
        ),
        ALLSELECTED ( Customers ),
        ALLSELECTED ( 'Calendar' )
    )
VAR CustomersWithLineage =
    TREATAS (
        CustomersWithNewDate,
        'Sale invoices'[customer_id],
        'Sale invoices'[date_id]
    )
VAR Result =
    CALCULATE (
        DISTINCTCOUNT ( 'Sale invoices'[customer_id] ),
        KEEPFILTERS ( CustomersWithLineage )
    )
RETURN
    Result


This works and I use this in a barchart on my report:

Schermafbeelding 2023-10-13 132452.png


Now when I click on one of the bars of this chart I want the report to be crossfiltered to shwo only the data for those new customers. But instead of showing only the data for the new customers the report only gets crossfiltered by the selected month and not only new customers.

I know that there should be a way to do this but i cannot find a way to do this.

I have 3 tables:
- Sale Invoices
- Customers
- Calendar

There are two excisting relationships:
'Sale invoices'[date_id] = 'Calendar'[date_id]
'Sale invoices'[customer_id] = 'Customers'[customer_id]


I would be very greatfull if someone could help me out here!

Thanks in advance!



3 REPLIES 3
QuentinRijkers
Frequent Visitor

Hi @lbendlin,

Thanks for your response. Is there a work around? I can not imagine i am the only one who wants to dynamicly count the new customers and be able to crossfilter to see who they are and what there activity is.

Using calculated column will make it no longer dynamic so I am trying to find a way how to keep it dynamic but still corssfilter in some way. 

Thanks in advance!

add the measure as a filter to all visuals on the page.

lbendlin
Super User
Super User

Measures can only filter individual visuals, not whole pages.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.