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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ak77
Helper V
Helper V

Check if the measures are Zero and Hide the row

Hi Bi Gurus,

 

Need a help on the below requirement..Please check.

 

I have a Table Viz with time series below measures

ak77_0-1712181662180.png

 

i want to Make the  entire Table row hidden if all the measure value is equal to zero.

 

i ttried summing up all measures and check if sum of all measure is zero then Hide it using a visual filter.. But it ran into performance issues.. So any other idea to get this done.. please help

 

 

 

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

Hi, @ak77 

You can refer to @amitchandak reply and if it does not solve the problem, you can refer to the following methods.

Before:

vyaningymsft_0-1712220559304.png

After:

vyaningymsft_1-1712220588390.png

Measure:

filter data =
IF ( ISBLANK ( 'Table'[Measure1] ) && ISBLANK ( 'Table'[Measure2] ), 0, 1 )


Regarding performance, I hope you'll try to adhere to the following approach when writing DAX:


1. Use variables. Using variables in DAX formulas helps to write more complex and efficient calculations.
2. avoid performing complex calculations at the line level, as they can lead to many repeated calculations.
3. Reduce the use of iterative functions as they need to perform multiple calculations and can lead to performance problems.
4. use ISBLANK() instead of =BLANK()
For more optimisation options please refer to the following links.
Related link: How to Optimize DAX Formulas in Power BI - Zebra BI

Best Regards,
Yang
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

2 REPLIES 2
v-yaningy-msft
Community Support
Community Support

Hi, @ak77 

You can refer to @amitchandak reply and if it does not solve the problem, you can refer to the following methods.

Before:

vyaningymsft_0-1712220559304.png

After:

vyaningymsft_1-1712220588390.png

Measure:

filter data =
IF ( ISBLANK ( 'Table'[Measure1] ) && ISBLANK ( 'Table'[Measure2] ), 0, 1 )


Regarding performance, I hope you'll try to adhere to the following approach when writing DAX:


1. Use variables. Using variables in DAX formulas helps to write more complex and efficient calculations.
2. avoid performing complex calculations at the line level, as they can lead to many repeated calculations.
3. Reduce the use of iterative functions as they need to perform multiple calculations and can lead to performance problems.
4. use ISBLANK() instead of =BLANK()
For more optimisation options please refer to the following links.
Related link: How to Optimize DAX Formulas in Power BI - Zebra BI

Best Regards,
Yang
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



amitchandak
Super User
Super User

@ak77 ,  You can have a measure like, using abs if some measures are negative, else avoid that. Not the below will sum all measures and you can check it is <> 0 and blank

Sumx({abs([M1]),abs([M2]), abs([M3]) }, [Value])

 

But I doubt if some measures are non performant, this measure can improve performance much

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.