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
Anonymous
Not applicable

I need a slicer to change all records in the table to 0

Hello everyone,

Suppose I have a table and table has 7 measures, and each measures brings records, null or zero 

It's being refreshed everyday.

What I need to do is to create a slicer and with one function :

when I say turn on activity It will show all the records 

from the database as is (default) 

When I say turn off activity It will show for the first 5 measures all 0 and rest of the 2 measures stay with records.

so, it's going to effect first 5 measures 

any ideas ?

1 ACCEPTED SOLUTION

Hi @Anonymous ,

I'm afraid I don't have a suitable way to implement your requirements. The data source you are connecting to is AAS and is in live connection mode, which can only create report level measure, not calculated tables, calculated columns, etc. Then there is no appropriate column to apply to the slicer since you can't create calculated columns or calculated tables...
If the connection mode of the report is Import, you can refer to @amitchandak 's approach and modify the first 5 measures.

Measure1= IF(SELECTEDVALUE(Table[Column]) <> "Hide", SUM([colname]), 0)

Best Regards

Community Support Team _ Rena
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
amitchandak
Super User
Super User

@Anonymous , you can use isfiltered

 

if(isfiltered(Table[Column]), [Measure1], 0)

 

same way for other measures

 

if(isfiltered(Table[Column]), [Measure2], 0)

 

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

 

it can be based on the value

 

if(selectedvalue(Table[Column]) <> "Hide", [Measure2], 0)

Anonymous
Not applicable

Hi 

Thank you for the response,

Correct I get a new column depending on [measure1] and all values are zero. 
but,

 

I need a slicer (AAS model only allow me to create a measure not a calculated column) 
to suppose we have a column with values

column: measure1
1st row : 16
2nd row: 18
3rd row:  7
4th row: 3
so on...
and 

I want to see 
all zeros on "that" column
0
0
...all


is there any way to do it ?

Hi @Anonymous ,

I'm afraid I don't have a suitable way to implement your requirements. The data source you are connecting to is AAS and is in live connection mode, which can only create report level measure, not calculated tables, calculated columns, etc. Then there is no appropriate column to apply to the slicer since you can't create calculated columns or calculated tables...
If the connection mode of the report is Import, you can refer to @amitchandak 's approach and modify the first 5 measures.

Measure1= IF(SELECTEDVALUE(Table[Column]) <> "Hide", SUM([colname]), 0)

Best Regards

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

Right, 

I was thinking to change data science queries to add another column and process the table in the aas model then use it in the pbix file.

I don't know it's good or bad now ? because business doesn't need this slicer for now

so, it's been hold off

thank you for advice.

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