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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lprabhal
Frequent Visitor

Struggling to create a measure based on current year

Hi Everyone,

 

I am a newbie to PBI and I am struggling to create a simple measure on a column. 

 

I have a date column CTT sign date and I am trying to create something like this.

 

If CTT sign date is current year then (measure1 * 1.52) - measure1 is a field from a table

IF(YEAR(VALUES('FACT Sales Pipeline'[CTT Sign Date])) = YEAR(TODAY()),(SUM('FACT Sales Pipeline'[Converted Booking]) * 1.52),0)

and this is giving me an error while displaying the view
"A table of multiple values was supplied where a single value was expected" 
 
I have to use Values here because when i used Year('FACT Sales Pipeline'[CTT Sign Date]) this throwed me error saying "Cannot find name"[CTT Sign Date]
 
Can someone please help me here
1 ACCEPTED SOLUTION
Shaurya
Memorable Member
Memorable Member

Hi @lprabhal,

 

Since you have to perform this operation for every date you should create a DAX column and not a measure. You can use:

 

Result = IF(YEAR('Table'[Date])=YEAR(TODAY()),'Table'[Field]*1.52,0)

 

Works for you? Mark this post as a solution if it does!
Check out this post of mine: Forecast Period - Previous Forecasts 
Spare some time to read: How to Export Telemetry Data from Azure IoT Central into Power BI 

View solution in original post

2 REPLIES 2
lprabhal
Frequent Visitor

Great! it's working, much appreciate your help

Shaurya
Memorable Member
Memorable Member

Hi @lprabhal,

 

Since you have to perform this operation for every date you should create a DAX column and not a measure. You can use:

 

Result = IF(YEAR('Table'[Date])=YEAR(TODAY()),'Table'[Field]*1.52,0)

 

Works for you? Mark this post as a solution if it does!
Check out this post of mine: Forecast Period - Previous Forecasts 
Spare some time to read: How to Export Telemetry Data from Azure IoT Central into Power BI 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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