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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

DAX measure to count rows filtered based on values from 2 separate table

Hi all!

 

Tables

Table_StoreList

Table_CustList

Table_Feedback_Received

Dim_Calendar

 

Relationships

'Table_Feedback_Received'[Date] -> 'Dim_Calendar'[Date]

'Table_Feedback_Received'[CustID] -> 'Table_CustList'[StoreID]

'Table_CustList'[StoreID] -> 'Table_StoreList'[StoreID]

'Table_CustList'[DateCreated] -> 'Dim_Calendar'[Date]  (inactive relationship)

 

There is a 'Table_CustList'[Status] with either "Active" or "Inactive".

 

How do I create a visual below?

__________________________________________________________________   Jan   Feb   Mar   Apr   May   Jun   Jul   Aug   Sep

Number_of_Active_Customers_with_1_or_more_Feedback YTD    |    N  |  N   |  N   |   N   |  N   |   N  |  N   |  N   |  N

 

I have tried with the following measure but it does not take into consideration whether the CustID is active or inactive (from Table_CustList[Status])

 

'Table_CustList'[Number_of_Active_Customers_with_1_or_more_Feedback = TOTALYTD(DISTINCTCOUNT('Table_Feedback_Received'[CustID]), 'Dim_Calendar Table'[Date])

 

Any ideas how to modify the above to get the desired visual?

 

Regards,

Yee Pin

3 REPLIES 3
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

 

Could you share a sample Power BI file?

You could share it via DropBox, One Drive, Drive or another similar tool.

 

A sample Power BI file will make it easier to help you.

 

Regards,

 

LC

Anonymous
Not applicable

@lc_finance  Hi LC, thanks for your attention! The pbix file contains confidential details and I am not able to share it. 

 

I will need time to create a sample file with sample data. Do you happen to have any hints for me in the meantime?

 

Regards,

Yee Pin

Hi @Anonymous ,

 

 

Yes, I am happy to share some hints.

 

I would do the following: use a SUMX expression that iterates the customer table and adds 1 each time the customer corresponds to the criteria.

I just wrote a blog post on something similar: iterating an Employee table to count the number of employees each month. You can find the post here, that could help you with the formulas.

 

I hope this is helpful, and do not hesitate to share the PBI file when you have it. I will be happy to help you further,

 

LC

Interested in learning Power BI and DAX? Check out my blog at www.finance-bi.com

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.