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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello all!
I am using a Timeline Slicer through a calendar table to extract the total of sales in a measure I have called "SumSalesTY":
SumSalesTY = VAR LimMin = FIRSTDATE(Calendar[MonYear]) VAR LimMax = LASTDATE(Calendar[MonYear]) RETURN CALCULATE(
SUM(Table1[Sales]),
ALLEXCEPT(Table1,Table1[Date],Table1[Unit]),
Table1[Date]>=LimMin,
Table1[Date]<=LimMax
)
It works well in a card visual, but I'm stuck as to how I can use it in a line chart.
Here's how my report looks so far:
The timeline slices through Calendar[MonYear] and is filtered to show only the "last" 24 months (actually jan-dec 2018 and 2019).
The yellow chart is only showing the sales total for Mar-Apr/2019, but actually I wanted it to show previous years as well (sales total for march+april each year):
How would I achieve that?
You may apply virtual relationship in DAX measure.
Thanks @v-chuncz-msft , but how would I do that? My timeline slices through Calendar[MonYear], which is (indirectly, I guess?) in a real relationship with Table1[MonYear]. (I say indirectly because in fact, I've linked Calendar[Date] with Table1[Date], though both tables also have "MonYear" columns.)
I can attest that the relationship works because I've checked that 5.3 M really is the total of sales for March+April 2019 (as in the example above).