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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Wresen
Post Patron
Post Patron

Change table values for slicer

Hi and thanks for reading this.

 

I have table with 3 columns, 2 of them have code in them but i would like to convert the code to measures since i have a few slicers that makes the condition to change. I use Month 2 in the a slicer.

What i am trying to do is to have a long table with "Month"(it is longer then the picture , had to cut it down) and when i use slicers in the report it changes the slicer that have "Month2" (so it only shows the the months that is >0,3 (0,3 is a calculated value from other data)) 

I hope i have manged to explain myself.

 

Month is just values

Check = if(slicer 1'[Value]>0,3;"YES")

Month2 = if('slicer 1'[Check] ="YES";slicer 1'[Month])
 
 

 

month.png

1 ACCEPTED SOLUTION

Hey @Wresen ,

 

now I understand you (atleast i hope 😛 )  - you want to have the slicer values to be calculated based on certain circumstances/slicings?

 

Sry that won't be possible since you can't put measures in a slicer. By putting a calculated column in it this would also NOT be helpful since calculated columns and tables are preprocessed and later slicings wouldn't change the values in a slicer.

 

BR,

Josef

View solution in original post

6 REPLIES 6
Ephsiba
New Member

datescount =
CALCULATE(
    COUNTROWS(DimDate),
    FILTER(
        Facts,
        Facts[Months] =Facts[Months]="DEC-NOV"
    ),
    REMOVEFILTERS(dimemps[Employee Name])
)
 
works correctly and gives the correct result. But when i change the slicer of Facts[Months] from DEC-JAN to NOV-DEC it doesnt work. 

I changed the code as 
datescount =
CALCULATE(
    COUNTROWS(DimDate),
    FILTER(
        Facts,
        Facts[Months],Facts[Months]=Selectedvalue(facts[Months])
    ),
    REMOVEFILTERS(dimemps[Employee Name])
)
 
It doesnt work. gives only empty values
 
JosefPrakljacic
Solution Sage
Solution Sage

Hey @Wresen,

 

did you mean something like this? If not please describe it in more detail what your expected result is and what values you have maybe post an example file 🙂

 

If this post was helpful may I ask you to mark it as solution and give it a 'thumbs up'? This will also help others

Have a nice day!

BR,
Josef
Graz - Austria

Hi Josef and thanks so much

 

After i posted my question i found out that i cant use measure in a slicers . please correct me if i am wrong.

 

Taking your file as an example i would be able it use the measure (that you have calculated ) and us that in a slicer and the slicer should show values 201803 and 201804 (same values measure is showing in the table/matrix

 

 

Hey @Wresen ,

 

now I understand you (atleast i hope 😛 )  - you want to have the slicer values to be calculated based on certain circumstances/slicings?

 

Sry that won't be possible since you can't put measures in a slicer. By putting a calculated column in it this would also NOT be helpful since calculated columns and tables are preprocessed and later slicings wouldn't change the values in a slicer.

 

BR,

Josef

 

Thanks so much for the help and answer Josef i really appreciate it.

 

You are very welcome @Wresen 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.