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.
I want to sum values in a column, as long as another column matches multiple values.
Currently, I can get the calculation to work if I only match to a single value of "08 Contract Signed". Listed equation below.
MAY 2019 =
CALCULATE(
SUM('AD_HOC Opportunity_ALL'[Expected_Value]),
ALL('AD_HOC Opportunity_ALL'[Stage]), 'AD_HOC Opportunity_ALL'[Stage] = "08 Contract Signed",
'AD_HOC Opportunity_ALL'[Opp_Close_Month] IN { "2019-05" }
)
However, if I try to filter by multiple values I receive an error message. Example below.
(I replaced "08 Contract Signed" in the above equation, with additional items in a {} list)
MAY 2019 =
CALCULATE(
SUM('AD_HOC Opportunity_ALL'[Expected_Value]),
ALL('AD_HOC Opportunity_ALL'[Stage]), 'AD_HOC Opportunity_ALL'[Stage] = {"08 Contract Signed", "07 Signature", "05 Written Notice"},
'AD_HOC Opportunity_ALL'[Opp_Close_Month] IN { "2019-05" }
)
Why is the second equation not working? Can I create a calculated measure to sum one column, if another column matches one of multiple values?
Solved! Go to Solution.
Did you try using IN operator instead of = ?
https://community.powerbi.com/t5/Desktop/How-to-use-filter-with-multiple-values-in-DAX/td-p/225922
Hope the above link helps!
Did you try using IN operator instead of = ?
https://community.powerbi.com/t5/Desktop/How-to-use-filter-with-multiple-values-in-DAX/td-p/225922
Hope the above link helps!
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 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |