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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
FredChew
Frequent Visitor

Items not showing on slicer filtered by measure

Hi there,

 

I am trying to filter items listed on a slicer using a measure to control the records that user can see on the report. But when there are deplicates of the items on the table thhose items does not appear on the filtered slicer. Here is what I have:

 

The measure I setup

 

Login User Measure =

IF (
SELECTEDVALUE( Courses_and_Teachers[user])= [UserMeasure],
1,
0
)
 
Also another measure to clean up the Username to match the user record
 
UserMeasure = SUBSTITUTE(SUBSTITUTE(USERNAME(),"@edu.au",""),"u","")
 
How the slicer and its filter is setup
 
2021-06-09_10-53-10.png
 
 
The result on the measure and the repeated items on the table
 
2021-06-09_10-51-23.png
Here is what I got on the final report with 5380807 login. ENVS1001 and ENVS2011 are both missing. I have checked 3177641 login ENVS2011 does not appear too. 
 
2021-06-09_10-50-36.png
 
May I know what have I done wrongly or missed? Or how better can this be done?
 
Thanks in advance!
1 ACCEPTED SOLUTION

Hi @FredChew ,

 

Please try to use the following measure:

Login User Measure =
IF (
    IFERROR (
        FIND (
            [UserMeasure],
            CONCATENATEX (
                VALUES ( Courses_and_Teachers[user] ),
                Courses_and_Teachers[user],
                ","
            )
        ),
        1
    ) = 1,
    0,
    1
)

 

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@FredChew There are two ways we can address this, either jump on a call and go over it or send the pbix file with the explanation and I can take a look.



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.

FredChew
Frequent Visitor

From the look at what I am getting it seems that I cannot have duplicate of the item on the table? But it doesn't make sense as only one of the duplicate is returning a '1' on the measure and the slicer filter is only filtering the '1'.

 

 

 

Does anyone has any idea? Or is there a better way to do this? Thanks heap.

 

 

Hi @FredChew ,

 

Please try to use the following measure:

Login User Measure =
IF (
    IFERROR (
        FIND (
            [UserMeasure],
            CONCATENATEX (
                VALUES ( Courses_and_Teachers[user] ),
                Courses_and_Teachers[user],
                ","
            )
        ),
        1
    ) = 1,
    0,
    1
)

 

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

 

Best Regards,

Dedmon Dai

 

Hi @v-deddai1-msft,

 

I have tried your measure, it works! Thanks heap.

parry2k
Super User
Super User

@FredChew what is [UESERMEASURE]



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.

@parry2k @UserMeasure = SUBSTITUTE(SUBSTITUTE(USERNAME(),"@edu.au",""),"u",""
 
It is a measure to strip off the extra text to match the record.
 
I have added this to my original post.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.