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
Analitika
Post Prodigy
Post Prodigy

Filter not working well in Power BI

Hi, 

 

Having slicer of two boxes. When I am trying select both boxes I getting value like I selected just one box. I expected that  selecting all boxes it will sum both boxes values. How to resolve this?

Analitika_0-1653567413666.png

USED Pardavimai su/be kasu =
IF (
CONTAINS ( 'Pajamu vaizdavimas', 'Pajamu vaizdavimas'[Parinkimas 4], "Be kasos" ),
[USED Pardavimai be kasu],
IF (
CONTAINS ( 'Pajamu vaizdavimas', 'Pajamu vaizdavimas'[Parinkimas 4], "Su kasa" ),
[USED OK Pardavimai],
BLANK ()
)
)

Here is code it calculates sales according to selected filter value. Although I select both boxes I am getting just one value, not both values sum.

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Analitika ,

 

Based on your description, [USED OK Pardavimai] is the total value, right? If so, try this:

Sales Amount =
IF (
    SELECTEDVALUE ( 'Pajamu vaizdavimas'[Parinkimas 4] ) = "Be kasos",
    [USED Pardavimai be kasu],
    [USED OK Pardavimai]
)

 

IF [USED OK Pardavimai] is not the total value, try this:

Sales Amount =
SWITCH (
    SELECTEDVALUE ( 'Pajamu vaizdavimas'[Parinkimas 4] ),
    "Be kasos", [USED Pardavimai be kasu],
    "Su kasa", [USED OK Pardavimai],
    [USED Pardavimai be kasu] + [USED OK Pardavimai]
)

 

 

 

Best Regards,

Icey

 

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

3 REPLIES 3
rohit_singh
Solution Sage
Solution Sage

Hi @Analitika ,

See if this solves your issue.
Click on your slicer, then navigate to the "Visualizations" pane. Click on "Slicer Settings" and select "Show select all option"

rohit_singh_0-1653569196648.png


You will now see a "Select all" option on your slicer. Choose this to show all data.

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

Sales Amount =
SWITCH (
TRUE (),
MAX('Pajamu vaizdavimas'[Parinkimas 4]) IN { "Be kasos", "Su kasa"}, [USED OK Pardavimai],
MAX('Pajamu vaizdavimas'[Parinkimas 4]) = "Be kasos", [USED Pardavimai be kasu],
MAX('Pajamu vaizdavimas'[Parinkimas 4]) = "Su kasa", [USED OK Pardavimai],
0
)
I used this formulae but when selected "Be kasos" still getting total value instead of [USED Pardavimai be kasu]
Icey
Community Support
Community Support

Hi @Analitika ,

 

Based on your description, [USED OK Pardavimai] is the total value, right? If so, try this:

Sales Amount =
IF (
    SELECTEDVALUE ( 'Pajamu vaizdavimas'[Parinkimas 4] ) = "Be kasos",
    [USED Pardavimai be kasu],
    [USED OK Pardavimai]
)

 

IF [USED OK Pardavimai] is not the total value, try this:

Sales Amount =
SWITCH (
    SELECTEDVALUE ( 'Pajamu vaizdavimas'[Parinkimas 4] ),
    "Be kasos", [USED Pardavimai be kasu],
    "Su kasa", [USED OK Pardavimai],
    [USED Pardavimai be kasu] + [USED OK Pardavimai]
)

 

 

 

Best Regards,

Icey

 

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

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.