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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Apply a slicer on a specific column in a table

Hi all,

 

I want that the slicer "Planning" filters only on the column "VERSION" of my table, the others must not be impact by the slicer : 

 

image.png

image.png

 

Can you help me on that point ?

 

Thanks in advance.

 

Luca 

1 ACCEPTED SOLUTION

Hi , @Anonymous 

Take a try this measure as below:

 

VERSION =
CALCULATE (
    SUM ( EDOC[FIC_Eval_Des_SolExpert_A] )
        + SUM ( EDOC[FIC_Eval_Build_SolExpert_B] );
    FILTER (
        EDOC;
        'EDOC'[Planning] IN DISTINCT ( 'SlicerTable'[Planning] )
            && ( EDOC[Macro statut] = "20-DESIGN"
            || EDOC[Macro statut] = "30-BUILD" )
    );
    USERELATIONSHIP ( 'Domain (Forecasts)'[Domain EDOC]; EDOC[Domain] )
)

 

If help ,here is another workaround.

Pbix attached

 

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

6 REPLIES 6
v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

Here is a workaround , please refer  to this demo.

pbix attached

Try steps as  below:
1.Create a calculate table as the slicer

Fruit slicer = DISTINCT(Fruit[Fruit(Date)])

2.Create a measure to replace the field "Kind (version)"

Kind (Version) measure = 
IF (
    CALCULATE ( COUNTROWS ( 'Fruit slicer' ), ALLSELECTED ( 'Fruit slicer' ) )
        < CALCULATE ( COUNTROWS ( 'Fruit slicer' ), ALL ( 'Fruit slicer' ) ),
    IF (
        CALCULATE (
            COUNTROWS ( 'Fruit' ),
            'Fruit'[Fruit(Date)] IN DISTINCT ( 'Fruit slicer'[Fruit(Date)] )
        ) > 0,
        SELECTEDVALUE ( Fruit[Kind (Version)] ),
        ""
    ),
    MAX ( Fruit[Kind (Version)] )
)

 

3. It will show as below:

35.png

If I misunderstood ,please let me know.

 

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

 

 

Anonymous
Not applicable

Hi @v-easonf-msft ,

 

Thanks for your answer, I think we are on the good way ! 

 

In fact VERSION is already a measure, can you help me to modify it ? 

 

VERSION = CALCULATE(sum(EDOC[FIC_Eval_Des_SolExpert_A])+sum(EDOC[FIC_Eval_Build_SolExpert_B]);FILTER(EDOC;EDOC[Macro statut]="20-DESIGN" || EDOC[Macro statut]="30-BUILD");USERELATIONSHIP('Domain (Forecasts)'[Domain EDOC];EDOC[Domain]))
 
Thanks 

Hi , @Anonymous 

Take a try this measure as below:

 

VERSION =
CALCULATE (
    SUM ( EDOC[FIC_Eval_Des_SolExpert_A] )
        + SUM ( EDOC[FIC_Eval_Build_SolExpert_B] );
    FILTER (
        EDOC;
        'EDOC'[Planning] IN DISTINCT ( 'SlicerTable'[Planning] )
            && ( EDOC[Macro statut] = "20-DESIGN"
            || EDOC[Macro statut] = "30-BUILD" )
    );
    USERELATIONSHIP ( 'Domain (Forecasts)'[Domain EDOC]; EDOC[Domain] )
)

 

If help ,here is another workaround.

Pbix attached

 

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

 

Hi,
Could you please share the PBIX file. I am also facing same issue.

Could you please share the PBIX file.

 

Suman

Greg_Deckler
Super User
Super User

Difficult to tell what is going on here or the best approach. You could use Edit Interactions to decouple the slicer from the table and then write a measure for Version that uses VALUES from your slicer. Or do the opposite and writes measures for everything else that use ALL. But, very difficult to tell which is best or if either will work. Suggest posting sample data and expected results.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

You have to create all the other measures with all. If we try to use interactions and stop it, then we might not get the value to filter too

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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