Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
dwel0120
Helper III
Helper III

Bar chart - YoY comparison - Future Dates

Hello - I have a line/bar graph that tracks a number of people (Light blue line - previous year and dark blue line is the current year). The bars represent the YoY change. How do I write the formula for the YoY change so the future dates or blank or don't show up yet until the Current Year has data? So from 9/4/2022 through 12/2/22 it wouldn't show the bars since there is no current year data yet. 

 

Current Measures:
WklyCY = 

calculate(
        sum(Table1[USERS]),
        Table1[SCHOOLYEAR] = "SY22-23"
)

 

WklyPY =
    calculate(
        sum(Table1[USERS]),
        Table1[SCHOOLYEAR] = "SY21-22"
)

 

WklyYoYChange =
[WklyCY]-[WklyPY]

dwel0120_0-1661798701932.png

 

1 ACCEPTED SOLUTION

will it work if you put it as a filter in your calculate statments for current year and YOY?

View solution in original post

4 REPLIES 4
claymcooper
Resolver II
Resolver II

Create a calculated column based on your date column:
Future Date = IF(Date > Today(), "Y","N")
Then filter your visual based on that column so that Future Date = N

@claymcooper That doesn't work because I still need it to show the PY line (the light blue line in my original post).

 

will it work if you put it as a filter in your calculate statments for current year and YOY?

@claymcooper  YES!! That totally worked. 

dwel0120_0-1661804648716.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.