cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
powerbityro Regular Visitor
Regular Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: respect slicer but not table

@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
icespedes Member
Member

Re: respect slicer but not table

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.

powerbityro Regular Visitor
Regular Visitor

Re: respect slicer but not table

TODAY dont work Man Sad

Community Support Team
Community Support Team

Re: respect slicer but not table

@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

icespedes Member
Member

Re: respect slicer but not table

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

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 292 members 2,463 guests
Please welcome our newest community members: