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
ChandraSekhar77
Frequent Visitor

Want to hide rows based on slicer selection if rows are less then 3.

 

Hi Community, 
Hope everyone is doing good. I have one requirement in power bi that I am not able to achieve. I have explained below and attached the screenshots as well.

 

I have a table with columns called Client id and domain name and subdomain name.

 

I want to add the client id in the slicer and when I select one client, the table sorting is under that client id. 

 

here the requirement is I want to add a condition if the selected client id have less than 3 rows(domains) then rows should be blank if its greater than 3 and less than 10 rows Rows should show but want to show some custom message in a card. if rows are more than 10 then no message just has to show all rows as it is. Hope you understand the requirement I know this is very challenging I hope someone would accept this challenge, looking forward to your solutions. let me know if you have any questions about this. 

ChandraSekhar77_1-1620028197848.png

 

 

5 REPLIES 5
v-yetao1-msft
Community Support
Community Support

Hi @ChandraSekhar77 

I don't really understand what you mean, maybe you can provide a screenshot for the result you want ?

I create a measure to count the rows by Client ID .If the number of rows less than 3,return blank; if the number is in 3 and 10 ,return custom message , if the number is greater than 10,return the number .

 

Measure =

var _count=COUNTA('Table'[domain name])

return IF(_count<3,BLANK(),IF(_count>=3 && _count<=10,"custom message", IF(_count>10,_count)))

Original Data:

Ailsa-msft_0-1620204657346.png

The effect is as shown:

Ailsa-msft_1-1620204657348.png

Ailsa-msft_2-1620204657350.png

Ailsa-msft_3-1620204657352.png

Best Regards

Community Support Team _ Ailsa Tao

 

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

Hello @v-yetao1-msft, as I said I have illustrated the output of how I wanted to achieve the solution please have a look at this and let me know if you understand at all. 

 


Web 1920 – 1.jpg

 

 

Thanks.

Thank you @v-yetao1-msft for your response. that is exactly what I want to like it the rows are less than three blank and everything you have provided, however, I want the changes on the table don't want to show on card only card we have to use for a custom message. I will try to provide an image in few mins if you still have any doubt 

ChandraSekhar77
Frequent Visitor

Hi @amitchandak thanks for your quick reply. However it was not working, When i try to add the measure in table visual only the measures rows are getting blank, my requirement is When you select a client id i wanted to show values if grater then 3 if less than 3 then rows should be blank

amitchandak
Super User
Super User

@ChandraSekhar77 , Create three meausres

 

M1 = calculate(distinctCOUNT(client[Client]), allselected(client))

measure 1= Switch( [M1] <3, blank() , [M1] >=3 && [M2] <=10, "Message" , [M1]& "")

Measure 2 = if([M1] >10, [M1], blank())

 

use measure 1 in card visual and Mesure 2 in a table visual or as a visual level filter for non blank

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.