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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sunilbeckham
Helper I
Helper I

Hide values in field parameters

Hello.

I have multiple columns in my table that look something like this:

Student IDAssessment Awareness of Self and environmentAssessment Cognitive SkillsAssessment Language and communicationAssessment Social skills..Assessment Physical - Fine MotorAssessment Physical - Gross Motor
1111332331
2222naBLANK212na
333321BLANK332
4444BLANK332na1

 

I have combined all the 6 Assessment columns in a field parameter 'Assessment Group'. I'm using this field parameter as a slicer and also as the dynamic X axis in a column chart. On the Y axis, I'm doing a simple:

CALCULATE(COUNTA(Student id),Assessment IN {1,2,3})


I want to hide the BLANK and na values from the X axis for all the assessments that are selected from the slicer group. Currently the visual looks like this:

sunilbeckham_0-1685734246485.png


Is there any way to hide the BLANK and na values regardless of which column is picked from the slicer? I tried doing it through the visual level filter but that affects the calculations on Y axis.
Any help on this would be appreciated.
Thanks!



1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @sunilbeckham ,

 

Please create a new measure like:

Measure = 
SWITCH(
    SELECTEDVALUE('Assessment'[Assessment Order]),
    0, IF(SELECTEDVALUE('Table'[Assessment Awareness of Self and environment]) IN {"1","2","3"},1),
    1, IF(SELECTEDVALUE('Table'[Assessment Cognitive Skills]) IN {"1","2","3"},1),
    2, IF(SELECTEDVALUE('Table'[Assessment Language and communication]) IN {"1","2","3"},1),
    3, IF(SELECTEDVALUE('Table'[Assessment Physical - Fine Motor]) IN {"1","2","3"},1),
    4, IF(SELECTEDVALUE('Table'[Assessment Physical - Gross Motor]) IN {"1","2","3"},1),
    5, IF(SELECTEDVALUE('Table'[Assessment Social skills..]) IN {"1","2","3"},1)
)

and then use it as visual's filter:

vcgaomsft_0-1685933605523.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

5 REPLIES 5
v-cgao-msft
Community Support
Community Support

Hi @sunilbeckham ,

 

Please create a new measure like:

Measure = 
SWITCH(
    SELECTEDVALUE('Assessment'[Assessment Order]),
    0, IF(SELECTEDVALUE('Table'[Assessment Awareness of Self and environment]) IN {"1","2","3"},1),
    1, IF(SELECTEDVALUE('Table'[Assessment Cognitive Skills]) IN {"1","2","3"},1),
    2, IF(SELECTEDVALUE('Table'[Assessment Language and communication]) IN {"1","2","3"},1),
    3, IF(SELECTEDVALUE('Table'[Assessment Physical - Fine Motor]) IN {"1","2","3"},1),
    4, IF(SELECTEDVALUE('Table'[Assessment Physical - Gross Motor]) IN {"1","2","3"},1),
    5, IF(SELECTEDVALUE('Table'[Assessment Social skills..]) IN {"1","2","3"},1)
)

and then use it as visual's filter:

vcgaomsft_0-1685933605523.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

@v-cgao-msft I have a quick follow up question if you don't mind.
I'm trying to sort the X axis now by column descending so that it's always in the order of 3,2,1. But it doesn't save the order of the axis when I select a different column from the field parameter slicer.
For example, I select 'Cognitive Skills' from the Assessment Group slicer, and I sort the axis on the visual by 'Assessment Cognitive Skills' column descending. It gives me the desired output 3,2,1. But when I select another Assessment from the slicer, It changes the order again and goes back to sorting it by Y axis.
See screenshot below:

 

sunilbeckham_1-1685989749425.png
Thanks in advance!

 

 

Hi @sunilbeckham ,

 

Normally, this needs to be sorted with the help of auxiliary columns, but in this case it doesn't apply.

 

You may consider using Unpivot for these columns in the PowerQuery editor.

vcgaomsft_0-1686014818389.png

Because the values on this axis originate from the same field, consider using a visual filter. Reference sample files

 

Best Regards,
Gao

Community Support Team

Thank you so much for your help. I really appreciate it.

Hi @v-cgao-msft 
This was brilliant. Thank you so much for your help, I really appreciate it 😀

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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