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
Anonymous
Not applicable

DAX filer to show more than 10 rows

Hello, 

 

I am trying to make a DAX expression to use DAX filer to show more than 10 rows?

 

DEFINE MEASURE SCHOOL[OrdersMeasure] = COUNTROWS(ORDERS)>10
EVALUATE
ROW("Column1",SCHOOL[OrdersMeasure] )

 

How can I use True and False here? If less than 10 rows print a message and if more than 10 show all rows. 

 

Thanks

 

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

I'm not sure what you try to achieve, can you elaborate?

 

In general - measure can only return a scalar value, so it will never return 10 rows. It could return concatenated rows, e.g. by using CONCATENATEX but then you basically convert a table to scalar. Currently yur measure returns TRUE/FALSE depending on the number of rows in the ORDERS table - is that what you want it to return?


IF can also only return a scalar (not a table), so I don't think it's applicable here

do you want to create a model, or to query the model by writing custom queries? If you use PowerBI as UI for your users then there is no need for that (unless you want to create calculated tables)



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Mate, remember that visuals HIDE ROWS where all the measures are BLANK. This should give you enough information about how to show the rows you want... If you still see rows where all the measures are BLANK, then you should uncheck the option somewhere in the visual that enables this behaviour.

Best
Darek

Anonymous
Not applicable

Thank you for your reply! I got a new requirement to also add custom messages at all levels, database or PowerBI, so I just went with applying the business rules at database level. Thanks again!

Stachu
Community Champion
Community Champion

I'm not sure what you try to achieve, can you elaborate?

 

In general - measure can only return a scalar value, so it will never return 10 rows. It could return concatenated rows, e.g. by using CONCATENATEX but then you basically convert a table to scalar. Currently yur measure returns TRUE/FALSE depending on the number of rows in the ORDERS table - is that what you want it to return?


IF can also only return a scalar (not a table), so I don't think it's applicable here

do you want to create a model, or to query the model by writing custom queries? If you use PowerBI as UI for your users then there is no need for that (unless you want to create calculated tables)



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Thank you for your reply. I came to same conculsion.

 

IF can also only return a scalar (not a table), so I don't think it's applicable here

I using business suppression rules on database level now so if some business rule is not met it displays a custom message.

 

Thank you very much! 

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.

Top Solution Authors