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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Not applicable

Count customers based on multiple variables and dates



We have a customer database with 3 million customers. It is structured like this :Merknad 2022-01-05 160757.jpg


I am trying to make conditional filters on this data. 

As an example, IF variable V1 AND V2 have a MAX date < MAX date of V4, then DISTINCTCOUNT customer 


However, when I need both V1 and V2 to have a MAX date < MAX date of V3 it returns nothing. 


I have tried to work around this but no solution so far. Any guidence is greatly apreciated! 


Update: If i use OR, it returns values, but if I use AND it returns nothing. Why?


Count test = calculate(DISTINCTCOUNT(v_DimCustomerCurrentAnonym[%PersonId_KEY]), OR(v_PersonProfileV[Variabel] = "V1", v_PersonProfileV[Variabel] = "V2"))




Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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


Power BI Monthly Update - May 2024

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