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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rishari
Frequent Visitor

Need help in optimizing Calculate divide with Filter function

Please help me to optimize the below measure. The visual is not even loading for the current measure

DAX Measure:

X_Percentage =
CALCULATE (

    DIVIDE ( Measure_A, Measure_B, 0),
    FILTER ( 'TableName', Calculated_column > 0 )
)

3 REPLIES 3
Anonymous
Not applicable

Hi @rishari ,

Please try below dax formula:

X_Percentage =
CALCULATE (
    DIVIDE ( Measure_A, Measure_B, 0 ),
    FILTER ( ALL ( 'TableName' ), Calculated_column > 0 )
)

If it also not work, please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

johnt75
Super User
Super User

Its better not to filter an entire table when you can just filter a column. Try

X_Percentage =
CALCULATE (
    DIVIDE ( Measure_A, Measure_B, 0 ),
    'TableName'[Calculated_column] > 0
)

It was not working, that's why i used filter function

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Users online (1,963)