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
SriGaG1
Helper II
Helper II

Power BI ALLEXCEPT function is not working with slicer switch functions

Hi There,

 

I am trying to build a calculaion to identify the total sum of values of product code. In tableau, we do use, {FIXED [PRODUCTCODE]: [SORT_SLICER_VALUE]}. But in power BI, I have wrote the same like below

 

output = CALCULATE([SORT_SLICER_VALUE],ALLEXCEPT('ProductMaster',' ProductMaster'[PRODUCTCODE]))

 

SORT_SLICER_VALUE = SWITCH(SELECTEDVALUE('Slicers Des'[Slicer Des]),
"Price variance/ kg Original - Actual", [Price variance/kg Original - Actual],
"Price variance/ ctn Original - Actual", [Price variance/ctn Original - Actual])

 

But this calculation returns the same disaggregated value in the [SORT_SLICER_VALUE] measure. As an example,

SriGaG1_0-1668837350707.png

 

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

Hi @SriGaG1 ,

 

According to your description, I have created a simple sample:

vjianbolimsft_0-1669110348294.png

It works fine in my side:

Measure = CALCULATE([SORT_SLICER_VALUE],ALLEXCEPT(ProductMaster,ProductMaster[PRODUCTCODE]))

vjianbolimsft_2-1669110494606.png

vjianbolimsft_3-1669110506494.png

 

 

If something is not quite the same as yours, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

5 REPLIES 5
v-jianboli-msft
Community Support
Community Support

Hi @SriGaG1 ,

 

According to your description, I have created a simple sample:

vjianbolimsft_0-1669110348294.png

It works fine in my side:

Measure = CALCULATE([SORT_SLICER_VALUE],ALLEXCEPT(ProductMaster,ProductMaster[PRODUCTCODE]))

vjianbolimsft_2-1669110494606.png

vjianbolimsft_3-1669110506494.png

 

 

If something is not quite the same as yours, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

VijayP
Super User
Super User

@SriGaG1 
SELECTEDVALUE('Slicers Des'[Slicer Des]) , this is what you have used to impact on allexcept but in the table it is not appearing, have you used it as a slicer externally! 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP  Exactly. I have created an extrernal table. Based on that table the slicer is determined. So is there any work around to do this ?

VijayP
Super User
Super User

@SriGaG1 

If you could mention what the desired outcome , it helps to give a solution




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP  thank you for the comment. Actually the required outcome is mentioned in the table i have provided. I will paste that one here as well. Pls refer the final column.

 

SriGaG1_0-1668839403474.png

Thanks

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.