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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Keep results from a matrix visual when using slicers and a measure with ALLSELECTED

Hi,

I have this visual matrix where I show some results from a measure:

RodCamargoJr_1-1695647636980.png

The measure used is:

Measure = SUM('Table1'[Results]) / CALCULATE(  SUM('Table1'[Results]) , ALLSELECTED('Table1'), VALUES('Table1'[Date]))

What I need is, when I use a slicer for the column "Shipper" and select a value, I need to keep the results of the previous image, (is the scenario where I don't select any slicer value):
RodCamargoJr_3-1695647851644.png
When I select a value from the slicer, the matrix will return this:
RodCamargoJr_2-1695647785037.png

 

The Table1 is something like this (the 'results' are just examples):
ShipperDateResults
SHIPPER 1---jul/22---102
SHIPPER 2---jul/22---408
SHIPPER 3---jul/22---502
SHIPPER 4---jul/22---42
SHIPPER 5---jul/22---4
SHIPPER 6---jul/22---21
SHIPPER 7---jul/22---525
SHIPPER 1---ago/22---78
SHIPPER 2---ago/22---213
SHIPPER 3---ago/22---210
SHIPPER 4---ago/22---802
SHIPPER 5---ago/22---20
SHIPPER 6---ago/22---17
SHIPPER 7---ago/22---43
etc...---etc...---etc...

Thank you for your help, community, 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

 

You can change ALLSELECT() to ALL()

Measure2 =
SUM('Table1'[Results]) / CALCULATE(  SUM('Table1'[Results]) , ALL('Table1'), VALUES('Table1'[Date]))

vyangliumsft_0-1695803373535.png

 

The ALLSELECT() function preserves the context beyond the explicit filters and the row and column filters, and the values change as the data is filtered.

ALLSELECTED function (DAX) - DAX | Microsoft Learn

 

The ALL() function returns all values in all rows or columns of a table, ignoring any filters that may have been applied.

ALL function (DAX) - DAX | Microsoft Learn

 

 

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

 

You can change ALLSELECT() to ALL()

Measure2 =
SUM('Table1'[Results]) / CALCULATE(  SUM('Table1'[Results]) , ALL('Table1'), VALUES('Table1'[Date]))

vyangliumsft_0-1695803373535.png

 

The ALLSELECT() function preserves the context beyond the explicit filters and the row and column filters, and the values change as the data is filtered.

ALLSELECTED function (DAX) - DAX | Microsoft Learn

 

The ALL() function returns all values in all rows or columns of a table, ignoring any filters that may have been applied.

ALL function (DAX) - DAX | Microsoft Learn

 

 

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.

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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