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
zehaoniu
New Member

I wanna select the value of salary from specific year, now I have "YEARS" column and "Salary" column

So how could I make it in measure?

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @zehaoniu ,

 

Please try DAX like below:

Measure = CALCULATE(SUM('Table'[salary]),'Table'[year]=SELECTEDVALUE('Table 2'[year]))
 
You could see this post regarding How to Get Your Question Answered Quickly:

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @zehaoniu ,

 

Please try DAX like below:

Measure = CALCULATE(SUM('Table'[salary]),'Table'[year]=SELECTEDVALUE('Table 2'[year]))
 
You could see this post regarding How to Get Your Question Answered Quickly:

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

put in the slicer your "Year" field.

 

Create a new measure: 

Measure = 
VAR _year= CALCULATE(MAX(Your_Table[Year]))
RETURN CALCULATE(MAX(Your_Table[Salary]), FILTER(Your_Table, Your_Table[Year] = _year))

Helpful resources

Announcements
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.