cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Patron

## year to date

Hello, i want to show a chart which shows the volumes of YTD (starting 1st April) going back in time. so for today it would shows

Bar 1 - 1st April 2024 - 21st April 2024

Bar 2 - 1st April 2023 - 21st April 2023

Bar 3 - 1st April 2022 - 21st April 2022

1 ACCEPTED SOLUTION
Solution Sage

same logic for each bar you want to display

Dax Measure:

Volume from 1st April 2024 to 21st April 2024 =

CALCULATE( SUM(YourData[Volume]),

DATESBETWEEN(

Date[Date],

DATE(2024, 4, 1),

DATE(2024, 4, 21)
))

6 REPLIES 6
Super User

pls try this

Column =
var _date=if(month('Table'[Date])=month(today())&&day('Table'[Date])<=day(today()),1)
return if(_date=1, "1st"&format('Table'[Date],"mmmm")&year('Table'[Date])&"-"&day(today())&format('Table'[Date],"mmmm")&year('Table'[Date]))

Proud to be a Super User!

Post Patron

i would just like to flag 1 in the column, not display a date. thanks for your help

Super User

then try this

Column =if(month('Table'[Date])=month(today())&&day('Table'[Date])<=day(today()),1)

Proud to be a Super User!

Post Patron

how would i calculate these values

Solution Sage

same logic for each bar you want to display

Dax Measure:

Volume from 1st April 2024 to 21st April 2024 =

CALCULATE( SUM(YourData[Volume]),

DATESBETWEEN(

Date[Date],

DATE(2024, 4, 1),

DATE(2024, 4, 21)
))

Solution Sage

Hello,

You can use a clustered column chart. Calculate the values for each bar in separe DAX and choose the order you want for display