Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi I'm trying to create a new table based on existing dataset query1 in power bi, Because there is a duplicate values in the Snap_date column in the query1, But we need to use only Snap_date as filter so, that's why I have written a query like these
First created a date table
Date Table =
CALENDAR (
Min('query1' [Snap_date],
Max('query1' [Snap_date]
)
Then created 2 measures in the Date Table
Start Date = Min('Date Table'[Date]
End Date = Max('Date Table'[Date]
In the last step I have created a table
NewTable =
SUMMARIZE (
FILTER (
query1,
query1[SNAP_DATE] >= [Start Date] &&
query1[SNAP_DATE] <= [End Date]
),
query1[ID],
query1[LN],
query1[AMT],
query1[CITY]
)
When I change the values in the slicer why these date measures are not filtering data according to the slicer
Please help!
Solved! Go to Solution.
Hi @Bhargav150 ,
The slicer visual can’t influence the calculated table.
Besides, try to calculate the measure to filter the new table.
Measure =
var _date = SELECTEDVALUE(NewTable[SNAP_DATE])
RETURN
IF(_date >= [Start Date] && _date <= [End Date], 1, 0)
Then, set the show items is 1.
Viewing the following document to learn more information.
Using calculated tables in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Bhargav150 ,
Based on my testing, please try the following methods:
1.Create the sample table.
2.Create the new calculated table.
NewTable =
SUMMARIZE (
query1,
query1[SNAP_DATE],
query1[ID],
query1[LN],
query1[AMT],
query1[CITY]
)
3.Create the new relationship between date table and calculated table.
4.Change the date range in the slicer visual.
5.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
FYI, the SNAPSHOT_DATE column updates daily with yesterday's date, but apart from that, the remaining columns' data is 90 percent similar. If I include SNAPSHOT_DATE in the summary, it will cause many duplicates. That's the problem here.
Hi @Bhargav150 ,
The slicer visual can’t influence the calculated table.
Besides, try to calculate the measure to filter the new table.
Measure =
var _date = SELECTEDVALUE(NewTable[SNAP_DATE])
RETURN
IF(_date >= [Start Date] && _date <= [End Date], 1, 0)
Then, set the show items is 1.
Viewing the following document to learn more information.
Using calculated tables in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Bhargav150 without model and details it is hard to spot issue.
Still, try v2 below
NewTable v2 =
VAR __Start_Date = Min('Date Table'[Date]
VAR __End_Date = Max('Date Table'[Date]
RETURN
SUMMARIZE (
FILTER (
query1,
query1[SNAP_DATE] >= __Start_Date &&
query1[SNAP_DATE] <= __End_Date
),
query1[ID],
query1[LN],
query1[AMT],
query1[CITY]
)
Proud to be a Super User!
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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |