Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi,
I've spent some time in trying to develop a script that would allow me to create a dynamic variance calculation based on dates from two different tables. The code looks as follows:
Solved! Go to Solution.
You will need to use ISFILTERED or ISCROSSFILTERED to figure out which of the date tables is filtered. What if they both are? Worst case you may have to use inactive relationships or disconnected tables.
Sounds very similar to a YoY calculation (apart from the sign). Could you show the data model?
Would you mind showing some sample data and indicate the expected outcome based on that sample data?
Sure, here's a mock up of the data model:
DM
So the expected outcome is to be able to calculate the variance of the number of rows in the fact_CoworkerHistory (Using a snapshot date column) table depending on which of the date tables I use to filter the no of rows.
You will need to use ISFILTERED or ISCROSSFILTERED to figure out which of the date tables is filtered. What if they both are? Worst case you may have to use inactive relationships or disconnected tables.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 23 | |
| 22 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 44 | |
| 42 | |
| 40 | |
| 39 |