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
I don't have date column in my data set but i have period(month) like 1,2,3...12. how can i do YTD calculations without having dates.
I want to create a graph visual of YTD by sales organisation.
Thanks,
Paruchuri
Solved! Go to Solution.
YTD is all months until the one selected, so something like this would work:
Measure YTD =
VAR SelectedMonth =
MAX ( Table[Period] )
RETURN
CALCULATE (
[Measure],
FILTER ( ALL ( Table[Period] ), Table[Period] <= SelectedMonth )
)
YTD is all months until the one selected, so something like this would work:
Measure YTD =
VAR SelectedMonth =
MAX ( Table[Period] )
RETURN
CALCULATE (
[Measure],
FILTER ( ALL ( Table[Period] ), Table[Period] <= SelectedMonth )
)
Hi Stachu,
Thanks for your reply. In calculate function you have used [Measure]. What it is refering to?
you should replace it with whatever measure you want to calculate, e.g.
SUM(Table[Column])
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 81 | |
| 66 | |
| 65 |