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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.