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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Radhe
Regular Visitor

Not able to create Previous YTD measure

Hi,

 

I am new to PowerBI DAX and I working on chart for comparing YTD and prevoius year YTD, however, I am not able to create previous YTD measure as it shows just one single value in Card but I am not able to make it work with chart.

Here are my measures for YTD and previous Year YTD.

 

YTD = TOTALYTD([Total Sales], 'Date'[Date])

Previous YTD = CALCULATE([Sales YTD], SAMEPERIODLASTYEAR(INTERSECT (
                VALUES ( 'Date'[Date] ),
                DATESBETWEEN ( 'Date'[Date], BLANK (), DATE(2019,12,31 )
            ))))
Can someone help with this? 
3 REPLIES 3
some_bih
Super User
Super User

Hi @Radhe try

Previous YTD= 

 CALCULATE (
        [Total Sales],
        PARALLELPERIOD ( 'Date'[Date], -1, YEAR )
    )
 
For Card visual I am not sure what you need. Try measure and let what else is needed / is it working. 
 

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hi @some_bih ,

 

The formula you gave did not work. The previous YTD over years is empty in table over the years but I can see one value in the card visual. I want the previous YTD to compare with YTD over the years. I have attached the Visual and settings. Hope this helps to understand my problem in more detail.

Let me know if you need more information.

 

The total sales itself is a measure.

Total Sales = SUM(Sales[Sales Amount])
 

 

Radhe_0-1692994347785.png

Radhe_1-1692994449468.png

 

Radhe_2-1692994716449.png

 

Radhe_3-1692994945083.png

 

 

 

 

 

Hi @Radhe as you already crrated YTD measure try

Previous YTD =
CALCULATE(
[YTD],
SAMEPERIODLASTYEAR('Date'[Date])
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.