Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
Am trying to create a calculated table with filter on selected dates (Quarter mindate and maxdate).
and my DAX is as follows:
filteredbyQtr =
VAR mindate =
MIN ( 'Date'[Date] )
VAR maxdate =
MAX ( 'Date'[Date] )
VAR result =
CALCULATETABLE (
Sales,
FILTER ( sales, Sales[SaleDate] >= mindate && Sales[SaleDate] <= maxdate )
)
RETURN
result
But seems this doesnt work... always returns full records.
Solved! Go to Solution.
Hi @PBIDataNerd ,
Tables and columns in PBI are ALWAYS STATIC.They're recalculated when data is refreshed.
Measures are dynamic and the value will change with slicer or other filtering methods.
You can try to apply the following measure =1 in the visual level filter as workaround:
filteredbyQtr =
VAR mindate =
MIN ( 'Date'[Date] )
VAR maxdate =
MAX ( 'Date'[Date] )
RETURN
IF(MAX('SALES'[SaleDate])>=mindate &&MAX('SALES'[SaleDate])<=maxdate,1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PBIDataNerd ,
Tables and columns in PBI are ALWAYS STATIC.They're recalculated when data is refreshed.
Measures are dynamic and the value will change with slicer or other filtering methods.
You can try to apply the following measure =1 in the visual level filter as workaround:
filteredbyQtr =
VAR mindate =
MIN ( 'Date'[Date] )
VAR maxdate =
MAX ( 'Date'[Date] )
RETURN
IF(MAX('SALES'[SaleDate])>=mindate &&MAX('SALES'[SaleDate])<=maxdate,1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hmm.. is there a way to just show only the dates which got sale and are within the selected quarter.
@PBIDataNerd , Only in visual tables using measures.
Variable using var in dax measure can have calculatedtable using slicer value
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |