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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
PaalA
Regular Visitor

Ignore 2 of 3 slicers on a page

As I try to make a summary page I have 3 slicers on the page(Slicers for column "Material=Food A", "Material duplicate 1=Food B" and "Material duplicat 2= Food C"). I need a formula to calculate the cost for the material filtred for in "Material", but when i try the formula below I get no value (only get "Blank"). It seems like it takes alle the three filters into account, because if i turn of interactions with 2 of the slicers it calculates the cost. 

 

Total cost product 1 = CALCULATE(SUMX(Table1,-Table1[kost1]-Table1[kost2]),ALLEXCEPT(Table1,Table1[Material]))

 

MaterialMaterial duplicate 2Material duplicate 2kost1 kost2 
Food AFood AFood A1012
Food bFood bFood b1514
Food cFood cFood c1312
Food dFood dFood d1117

 

If anyone can help me with a formula that works for the scenario given above, it's hihgly appreceated!

1 ACCEPTED SOLUTION

Hi @PaalA 

Create measures

per material = SUM('Table'[kost1])+SUM('Table'[kost2])

Measure 1 = CALCULATE([per material],FILTER('Table','Table'[Material]=SELECTEDVALUE(compare1[Material1])))

Measure 2 = CALCULATE([per material],FILTER('Table','Table'[Material]=SELECTEDVALUE(compare2[Material2])))

Measure 3 = CALCULATE([per material],FILTER('Table','Table'[Material]=SELECTEDVALUE(compare3[Material3])))

Capture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie 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

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @PaalA 

As parry2k suggested, create two sperate tables,

compare1 = VALUES('Table'[Material])

compare2 = VALUES('Table'[Material])

Add [Material1] and [Material2] into the slicers.

Create measures

compare_value1 = CALCULATE(SUM('Table'[kost1])+SUM('Table'[kost2]),FILTER('Table','Table'[Material]=SELECTEDVALUE(compare1[Material1])))

compare_value2 = CALCULATE(SUM('Table'[kost1])+SUM('Table'[kost2]),FILTER('Table','Table'[Material]=SELECTEDVALUE(compare2[Material2])))
per material = CALCULATE(SUM('Table'[kost1])+SUM('Table'[kost2]),ALLEXCEPT('Table','Table'[Material]))

Edit interactions as below

Capture18.JPGCapture19.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi,

Thank you for a good and fast answer.

I have one follow up question though: I'm going to use all the values in one diagram (e.g. pie chart). It don't seems to be working when doing this because I can't turn of the interaction between slicer 1 and the diagram without getting the whole sum of the table.

Is there a way to solve this so i can use the values together in diagrams to make a summary? 

 

Thanks a lot for your help!

Hi @PaalA 

Create measures

per material = SUM('Table'[kost1])+SUM('Table'[kost2])

Measure 1 = CALCULATE([per material],FILTER('Table','Table'[Material]=SELECTEDVALUE(compare1[Material1])))

Measure 2 = CALCULATE([per material],FILTER('Table','Table'[Material]=SELECTEDVALUE(compare2[Material2])))

Measure 3 = CALCULATE([per material],FILTER('Table','Table'[Material]=SELECTEDVALUE(compare3[Material3])))

Capture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@PaalA You have to create a separate table for each slicer and make no relationship with your data table and then use values from these slicers to filter your data table.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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