March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
In my original raw data, it starts from 1/1/2019 to 9/15/2021.
I'm wondering whether I can achieve this performance:
If the slicer YearMonth = 2021/07, the bar chart will only show from 2021/01 to 2021/07.
Also if the slicer YearMonth = 2020/07, the bar chart will only show from 2020/01 to 2020/07.
One thing needed to notice is that, I already made a one to many relationship between date table and the fact table with "Date" column. (Because I have other charts in this dashboard).
Thanks for your time.
Yun
Hi YunJ ,
There are two tables.
Fact table and date table, if you have created a relationship between them, then copy the date table without no relationship.
Fact table :
Date table:
1 Create a measure
Measure =
var Selectdate=SELECTEDVALUE('Date table'[Date])
return
CALCULATE(SUM([Value]),
FILTER('Fact Table','Fact Table'[Year/month].[Year]=YEAR(Selectdate)&&'Fact Table'[Year/month]<=Selectdate)
)
2 Create a chart and put field Year/month in the Axis(Under the drop-down menu, leave the date hierarchy unchecked, as shown in the picture.), Measure in the Values.
3 Create slicer with the Date table’s Date column(Similarly, do not select date hierarchy). Now you select a month and the chart will show the values before that month in the current year.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi, may I have a demo?
@YunJ , Are planning to select one period and want to show data more than that. Then you need an independent table
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |