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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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