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
powerbityro
Helper II
Helper II

respect slicer but not table

hi all,

 

i have following measure

 

test = IF ( HASONEVALUE(calender[year]); VALUES(calender[year])-5 )
 
i use this and not selctedvalue because i work with the live connection. when i for example select the slicer year = 2019 i want following table:
 
year test
2019 2015
2018 2015
2017 2015
2016 2015
2015 2015
 
but i get
 
year test
2019 2014
2018 2013
2017 2017
2016 2016
2015 2015
 
can i somehow except the year in the table but not the slicer?
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@powerbityro 

 

Make sure the [year] column dragged to table visual comes from another table that has no relationship with the slicer.

Community Support Team _ Sam Zha
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

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@powerbityro 

 

Make sure the [year] column dragged to table visual comes from another table that has no relationship with the slicer.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Because it is a dynamic measure. You should try this:

 

test = IF ( HASONEVALUE(calender[year]); VALUES(TODAY(calender[year])-5 )

 

or this

 

test = IF ( HASONEVALUE(calender[year]); VALUES(TODAY()-5 )

 

or this

 

test = IF ( HASONEVALUE(calender[year]); VALUES(YEAR(TODAY())-5 )

 

I dont remember the proper way, but the idea is to use today's year instead of the five years less than the selected value.

TODAY dont work Man Sad

Anonymous
Not applicable

Try using Max(Year), Max(Month), Max(Day) or something like that 

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.

Top Solution Authors