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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
powerbi56
Frequent Visitor

How do I not get the slicer to affect the table?

Hi, this may be a simple issue but I'm unable to figure it out.

 

I have a table- 

powerbi56_0-1715035546121.png

I have made it by using the percent of column total because I need to see the percent of the each result per month. The values do not change when I use the date slicer. But it does change to 100% when I have the Last result PGS slicer- since I click it, that is the total column assuming that's why it shows up as 100%. How do I still use the slicer but keep these orginal numbers?

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@powerbi56 , Assuming you are using a date table for month and year, you can have measure like

 

divide([Measure], calculate([measure], filter(all(Date), Date[Year] = max(Date[Year]) && Date[Month] = max(Date[Month]) )) )

 

or

 

divide([Measure], calculate([measure], removefilters(Table[Last result PGS]) ) )

View solution in original post

v-yangliu-msft
Community Support
Community Support

Thanks for the reply from @amitchandak , please allow me to provide another insight: 
Hi  @powerbi56 ,

 

You can use the measure+all() function instead:

All(): returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.

Refer to:

ALL function (DAX) - DAX | Microsoft Learn

 

 

Measure =
var _sum=
SUMX(
    FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[Value])
return
DIVIDE(
    SUM('Table'[Value]),_sum)

 

 

vyangliumsft_0-1715046475580.png

 

Best Regards,

Liu Yang

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

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from @amitchandak , please allow me to provide another insight: 
Hi  @powerbi56 ,

 

You can use the measure+all() function instead:

All(): returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.

Refer to:

ALL function (DAX) - DAX | Microsoft Learn

 

 

Measure =
var _sum=
SUMX(
    FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[Value])
return
DIVIDE(
    SUM('Table'[Value]),_sum)

 

 

vyangliumsft_0-1715046475580.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@powerbi56 , Assuming you are using a date table for month and year, you can have measure like

 

divide([Measure], calculate([measure], filter(all(Date), Date[Year] = max(Date[Year]) && Date[Month] = max(Date[Month]) )) )

 

or

 

divide([Measure], calculate([measure], removefilters(Table[Last result PGS]) ) )

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.