Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi guys !
I am very new to PowerBI and it's just been two weeks in learning the tool .
Could you suggest me the Dax measure, functions, syntax or any idea of resolving this requirement ?
Basically the requirement is I have to create an area chart which shows the trend . And when I select a particular date in the slicer it has to filter the Visual and show the next 7days value in the visual .
Kindly pour in your thoughts and ideas . Any advise or suggestions and motivations as I am new to PowerBI and DAX would be really appreciated. Thank you all ♥️
Solved! Go to Solution.
Hi @prv_1401 ,
Based on your description, I have created a simple sample:
Please try:
FIrst, create a Date table
Then build relationship between the two tables
Then create a new table for slicer(this table does not have any relationship between other tables)
Apply it to the slicer and turn on single select of the slicer
Then create a measure and apply it to the visual
Measure =
VAR _a =
SELECTEDVALUE ( 'For Slicer'[Date] )
RETURN
CALCULATE (
MAX ( 'Table'[Value] ),
FILTER ( 'Table', [Date] >= _a && [Date] <= _a + 7 )
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @prv_1401
Please try:
Measure =
VAR _a =
SELECTEDVALUE ( 'For Slicer'[Date] )
RETURN
CALCULATE (
MAX ( 'Table'[Value] ),
FILTER ( 'Table', [Date] > _a && [Date] < _a + 7 )
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @prv_1401 ,
Based on your description, I have created a simple sample:
Please try:
FIrst, create a Date table
Then build relationship between the two tables
Then create a new table for slicer(this table does not have any relationship between other tables)
Apply it to the slicer and turn on single select of the slicer
Then create a measure and apply it to the visual
Measure =
VAR _a =
SELECTEDVALUE ( 'For Slicer'[Date] )
RETURN
CALCULATE (
MAX ( 'Table'[Value] ),
FILTER ( 'Table', [Date] >= _a && [Date] <= _a + 7 )
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Thank you so much for the reply. It does work .
However I dont want the selected date value to be shown in the visual . Only the next 7 days of the selected date want to be shown. From the above sample If I select 1-6-22 , the chart should show the values of date 7,8,9,10,11,12 .
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 15 | |
| 8 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 12 | |
| 10 | |
| 5 |