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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mocha911
Frequent Visitor

how to compare 2 dates from different fact tables?

Hi All,

I am trying to write a DAX measure to get a flag which shows a service date (from Fact_Service table) greater than then upgrade date (from Fact_Member table). There is a Member dimension table between these two fact tables like below -

mocha911_0-1722899721014.png

This is the output that I want to achieve in PowerBI-

mocha911_1-1722899780893.png

There are multiple upgrades for each member and of course multiple services for each member in both fact tables.

But atm I only need the latest upgrade date to compare with all service dates for simplicity.

Any ideas how to do it? thanks

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @mocha911 ,

 

I assume that the dimension table has 2 one-to-many relationships with 2 fact tables.

vxiaocliumsft_0-1722912806609.png

Here is my sample data.

vxiaocliumsft_0-1722912844037.png

Please try this measure

Measure 3 = IF( SELECTEDVALUE('Fact services'[Service Date])> SELECTEDVALUE('Fact member'[Upgrade Date]),1,0)

 

Result

vxiaocliumsft_0-1722912966208.png

 

 

Best Regards,

Wearsky

Thank you for the suggestion Wearsky, 

I tried your measure but it shows an error - "Visual has exccede the available resources"

I am guessing the data is too big to do such an action? any other advices? thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.