Forum Discussion

user_guddu10's avatar
user_guddu10
Icon for Advocate I rankAdvocate I
1 year ago
Solved

How to Filter DAX Measure in CALCULATE Based on Another Measure's Value

I'm developing a Power BI report to analyze environmental data by counting distinct companies based on specific criteria. I have several DAX measures and a custom category table involved in this setu...
  • Kedar_Pande's avatar
    1 year ago

    user_guddu10 

    Updated Measure:

    Filtered_Asset_Count = 
    CALCULATE(
    DISTINCTCOUNT('ESG_Assets_Data_Pivot'[company_name]),
    FILTER(
    SUMMARIZE(
    ESG_Assets_Data_Pivot,
    ESG_Assets_Data_Pivot[company_name],
    ESG_Assets_Data_Pivot[report_year],
    "AvgEmissionsPerRevenue",
    DIVIDE(
    [Total Emissions Latest Survey Year],
    [Total Revenue Latest Survey Year] / 1000000,
    0
    )
    ),
    [AvgEmissionsPerRevenue] > 0.1
    )
    )
    💡 If this helped, please give Kudos 👍 or mark it as a Solution ✅.
    Best regards,
    Kedar
    🌐 Connect on LinkedIn