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
I have a data table that has transactions for a retail business. I am wanting to make a line chart which has each year as a separate line, and then the month/day as the horizontal axis with quantity sold as the vertical axis. Ultimately I would like the line to be a running total as of the date on the horizontal axis the quantity sold year to date.
The first problem I am having is with getting just the month-day. I was able to separate out the year from the 'SaleDay' but any time I try to just get the month-day separate I keep getting errors. I am using DirectQuery to an sql database so as the database updates the chart will update as well. So some solutions I have found on the forum have not worked because it says it is not supported by directquery.
If anyone has a suggestion for also get a running total (the quick measure way didn't work for me, maybe I did wrong fields) I would be very appreciative.
Solved! Go to Solution.
Do You have predefined values for years? If so, you can create a measure for given years current total and place them on your chart.
A measure definition could be like that:
2016 = CALCULATE ( [your measure], FILTER ( ALL ( Table[SaleDay] ), MONTH(Table[SaleDay]) <= MAX ( MONTH(Table[SaleDay]) ) && YEAR ( Table[SaleDay] ) = 2016 ) )
and your result would look like:
Do You have predefined values for years? If so, you can create a measure for given years current total and place them on your chart.
A measure definition could be like that:
2016 = CALCULATE ( [your measure], FILTER ( ALL ( Table[SaleDay] ), MONTH(Table[SaleDay]) <= MAX ( MONTH(Table[SaleDay]) ) && YEAR ( Table[SaleDay] ) = 2016 ) )
and your result would look like:
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 |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |