cancel
Showing results for 
Search instead for 
Did you mean: 
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 III
Super User III

@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.






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

 

View solution in original post

Hi @v-deddai1-msft,

 

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

parry2k
Super User III
Super User III

@FredChew what is [UESERMEASURE]






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

@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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors