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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Pinoo39
Frequent Visitor

Filter DIM based on Slicer Values

Hey,

 

I have 3 Tables in my model, which are DimUsers, DimDate and FactSales. A slicer is showing month names from DimDate.

I want to find out users that are created in selected month from slicer. Normally if cross direction relationship is active the count of user_ids will show users in FactSales in the selected month but I need all users even if they have not bought any items.

I need Users that have been signed up in the selected month from slicer. the DimUsers contains a column (created_at) showing the users's creation date.

 

Here is the DAX I wrote but its not working

 

Sign Up = CALCULATE([User Counts], FILTER('DimUsers', 'DimUsers'[created_at_DimDateKey] in RELATEDTABLE(DimDate)))

 

Any Ideas ?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Pinoo39 , Create an inactive relation between date and created_at and try useuserelation. You might have to use crossfilter(none) for fact

Sign Up = CALCULATE([User Counts], userelation(DimDate[Date], 'DimUsers'[created_at]))

refer: https://www.youtube.com/watch?v=e6Y-l_JtCq4

 

Another way is

Sign Up = CALCULATE([User Counts],filter(DimUsers , DimUsers[created_at] in values(DimDate[Date])))

or

Sign Up = CALCULATE([User Counts],filter(DimUsers , DimUsers[created_at] in allselected(DimDate[Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Pinoo39 

Try this

 

Sign Up =
CALCULATE (
    DISTINCTCOUNT ( 'DimUsers'[User_ID] ),
    'DimUsers'[created_at_DimDateKey] IN DISTINCT( DimDate[Date] )
)

 

 

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

amitchandak
Super User
Super User

@Pinoo39 , Create an inactive relation between date and created_at and try useuserelation. You might have to use crossfilter(none) for fact

Sign Up = CALCULATE([User Counts], userelation(DimDate[Date], 'DimUsers'[created_at]))

refer: https://www.youtube.com/watch?v=e6Y-l_JtCq4

 

Another way is

Sign Up = CALCULATE([User Counts],filter(DimUsers , DimUsers[created_at] in values(DimDate[Date])))

or

Sign Up = CALCULATE([User Counts],filter(DimUsers , DimUsers[created_at] in allselected(DimDate[Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
CNENFRNL
Community Champion
Community Champion

@Pinoo39 , you may try this

Sign Up = CALCULATE([User Counts], CALCULATETABLE(FactSales))

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
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!

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.