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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mahra-in
Helper II
Helper II

Measure based on the selected year from calender table

Hi

 

I need help to create a "Target" measure based on the year selected in visual.

 

I have a calender table and provided slicer for year selection alone. Based on the selected year my report changes.

 

Now I want a Target for a particular chart using another table as "30000" if the selected year is "2017" and "20000" if the people choose year as "2018"

 

Please help.

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=IF(HASONEVALUE(Calendar[Year]),IF(VALUES(Calendar[Year])=2017,30000,20000),BLANK())

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=IF(HASONEVALUE(Calendar[Year]),IF(VALUES(Calendar[Year])=2017,30000,20000),BLANK())

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.