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

multi select in slicer for dynamic measure

I have Dataset similar to below

 

cliente_valueTypeQuantity
0009a4fe-d5ba-e911-a97b-000d3ac1bb7cEI96
0009a4fe-d5ba-e911-a97b-000d3ac1bb7cEFII82
0009a4fe-d5ba-e911-a97b-000d3ac1bb7cEFI170
0008a4fe-d5ba-e911-a97b-000d3ac1bb7cEFI17
0008a4fe-d5ba-e911-a97b-000d3ac1bb7cEI3
0006a4fe-d5ba-e911-a97b-000d3ac1bb7cEI18
0006a4fe-d5ba-e911-a97b-000d3ac1bb7cEFII62
0006a4fe-d5ba-e911-a97b-000d3ac1bb7cEFI63
0005a4fe-d5ba-e911-a97b-000d3ac1bb7cEI28
0003a4fe-d5ba-e911-a97b-000d3ac1bb7cEI23

 

This dataset is connected in a account table with unique values.

I need to create a disconnected table with measure names for Dynamic visual change to show accounts with the client_value type and to show without that type. For example, sometimes I want to see accounts with "EI" and "EFI" type  and sometimes I want to see accounts that doesn't have "EI" type. 

I tried to create this measure:

VAR acc_id= SELECTEDVALUE(accounts[accountid])
VAR EI =
    CALCULATETABLE( VALUES(accounts[accountid]),
        FILTER(bz_potencials,
            bz_potencials[type] = "EI"
        )
    )

VAR EFI =
    CALCULATETABLE( VALUES(accounts[accountid]),
        FILTER(bz_potencials,
            bz_potencials[type] = "EFI"
        )
    )

VAR EFII =
    CALCULATETABLE( VALUES(accounts[accountid]),
        FILTER(bz_potencials,
            bz_potencials[type] = "EFII"
        )
    )
RETURN
SWITCH(TRUE(),
SELECTEDVALUE( '*Face'[Face]) = "with EI"
&& acc_id IN EI, 1,
SELECTEDVALUE( '*Face'[Face]) = "with EFI"
&& acc_id IN EFI, 1)

 

this '*Face' table is a non-related table just to create the options to show accounts that I want to see.

 

I need help, please! 

2 REPLIES 2
amitchandak
Super User
Super User

@massotebernoull , not very clear, but check if field parameters can help

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

 

Power BI- Create dynamic slicers using field parameters: https://youtu.be/H2ZxWaHAJZQ


Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

 

 

Sorry @amitchandak , I’m going to try to enlighten it.

I have ‘accountid’ as dimension table and ‘bz_potencials’ as fact table.

 

massotebernoull_0-1675712660109.png

 

They can connect by accountid = _bz_client_value (but I'm not sure if it will work if I conect these tables).

Accountid has accounts, like this:

 

Accountid

0009a4fe

0008a4fe

0006a4fe

0005a4fe

0003a4fe

 

 

And this is Bz_potencials:

cliente_value   

Type

Quantity

0009a4fe

EI

96

0009a4fe

EFII

82

0009a4fe

EFI

170

0008a4fe

EFI

17

0008a4fe

EI

3

0006a4fe

EI

18

0006a4fe

EFII

62

0006a4fe

EFI

63

0005a4fe

EI

28

0003a4fe

EI

23

 

I need to create a slicer that gives me do two kind of analysis:

The first one is to see accounts that have some specific type, like EI, EFI or EFII.

The other analysis, is to see accounts that doesn’t have that king of type (accounts that doesn’t have EI, for example).

The measure I’m failing to create, also is not giving me any information when I try to filter more than one option, like EI and EFI.

 

I really appreciate your help, thank you!

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.