Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I am trying to build a chart that shows the data of each week as well as the YTD total as it goes through the weeks. Currently my DAX function is:
Solved! Go to Solution.
Hi:
I'll attach a file for you. Please see page 2 "YTD". I hope you can mark as solution if this works for you. Thankshttps://drive.google.com/file/d/1lzi428Xm1DqMPlMOkMjXoYKALkvJxvlv/view?usp=sharing
Sometimes it's tough to compare weekly sales to YTD , especially when the YTD figures dwarf the weekly figures.
Hi:
Were you able to check on the solution? Thanks..
Hi:
I'll attach a file for you. Please see page 2 "YTD". I hope you can mark as solution if this works for you. Thankshttps://drive.google.com/file/d/1lzi428Xm1DqMPlMOkMjXoYKALkvJxvlv/view?usp=sharing
Sometimes it's tough to compare weekly sales to YTD , especially when the YTD figures dwarf the weekly figures.
This solution worked for me:
Hi:
Your Date Table should ocnnect to your Fact Table [Delivery Date] and then you don't need that column in your measure.
YTD = CALCULATE(SUM(Table1[Quantity]), DATESYTD('Date Table'[Date]) or
YTD = TOTALYTD(SUM(Table1[Quantity]), 'Date Table'[Date])
I hope this helps!
@Whitewater100 Thank you for your suggestion, but neither of these expressions provided a different visual than shown above. Are there any other ways to calculate year to date?
Yes but those should work if you have date table marked as Date Table with only consequtive date.
If this next sugestion doesn't work, please send an example pbix file as something seems off.
Total Sales = SUM(Table1[Quantity])
Cumulative Sales = CALCULATE([Total Sales],
FILTER(ALLSELECTED('Date Table'[Date]),
'Date Table'[Date] <= MAX('Date Table'[Date]))
If you have multiple years you can add IF statement preceding:
= IF('Date Table'[Year] = "2022", FORMULA ABOVE
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 11 | |
| 6 | |
| 5 |