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.
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.
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:
The effect is as shown:
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.
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
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
@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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |