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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Varpat
Frequent Visitor

appear zero in IYA field dax formula for year 2019

Hi,

 

I have data ranging from year 2019 till 2022

 

I have a calculation that returns IYA so lets suppose if august 2022 saw a rise of 3% from August 2021 the IYA would show 103. 

 

The below formula is working fine but the issue is that year 2019 is also giving IYA numbers, where i would want it to be blank or have zero? 

Rolling YOY month value all(%)-TEST =
 Var
  Deduction = [Sum of all sales_Value]-[Sum Of Value all - YOY]

var Div = [Sum Of Value all - YOY]
var test =
DIVIDE(Deduction,Div)
var iya = 100/100 + test*DIVIDE(1,1)
Return
iya*100.0
1 REPLY 1
amitchandak
Super User
Super User

@Varpat , you can have measures like

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))


last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Previous year Month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-11,MONTH)))

 

or year behind measure

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.