Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
In my model, I have a table called Date with a relationship with a table called IntegrityExceptions. Date.FullYear has a realtionship with IntegrityExceptions.Exception Date In. I have created a table like this:
Solved! Go to Solution.
You can wrap the CALCULATETABLE in a COUNTROWS function and use the resulting measure as a filter for the visual in the filter pane setting the value to greater or equal to 1.
Something along the lines of:
Table 3 =
VAR yr =
MAX ( 'Date'[Year] )
RETURN
COUNTROWS (
CALCULATETABLE ( IntegrityExceptions, 'Date'[Year] = yr, 'Date'[Quarter] = 2 )
)
However, if you need to calculate values for other periods based on date slicers, it is highly recommended you create a date table with continuous dates covering the range of dates in the model. You can then use Time Intelligence functions for the calculations
Proud to be a Super User!
Paul on Linkedin.
Thanks Paul. What would be a way to have a filtered table based on what is selected in the slicers? I need to be able to create a data set that time travels, one quarter ago, two quarters ago, etc.
You can wrap the CALCULATETABLE in a COUNTROWS function and use the resulting measure as a filter for the visual in the filter pane setting the value to greater or equal to 1.
Something along the lines of:
Table 3 =
VAR yr =
MAX ( 'Date'[Year] )
RETURN
COUNTROWS (
CALCULATETABLE ( IntegrityExceptions, 'Date'[Year] = yr, 'Date'[Quarter] = 2 )
)
However, if you need to calculate values for other periods based on date slicers, it is highly recommended you create a date table with continuous dates covering the range of dates in the model. You can then use Time Intelligence functions for the calculations
Proud to be a Super User!
Paul on Linkedin.
CALCULATETABLE is a function which creates a table. Calculated (physical) tables are loaded when the model is loaded and are oblivious to slicers (you can check by hard-coding the date in the CALCULATETABLE function to see how it loads)
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |