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.
Hey,
I'm trying to make a measure that will not display a sum on a graph if certain criteria are met. However, instead of breaking it goes ahead and displays the sum regardless of whether or not the if statement conditions are met. How can I make a measure that will not display aggregated counts if certain criteria are met?
Ex -
Input: 24, 52, 37
Measure: If(Count(Input)>2, "Please maintain 1-2 inputs", Sum(Input)
Desired Output: "Please maintain 1-2 inputs"
Actual Output: Sum(Input)
Solved! Go to Solution.
HI @Anonymous,
Greg's suggestion seems well, I share the sample formula here.
Measure = IF ( COUNTROWS ( ALLSELECTED ( Table[Input] ) ) > 2, "Please maintain 1-2 inputs", SUMX ( ALLSELECTED ( Table[Input] ), [Input] ) )
Regards,
Xiaoxin Sheng
HI @Anonymous,
Greg's suggestion seems well, I share the sample formula here.
Measure = IF ( COUNTROWS ( ALLSELECTED ( Table[Input] ) ) > 2, "Please maintain 1-2 inputs", SUMX ( ALLSELECTED ( Table[Input] ), [Input] ) )
Regards,
Xiaoxin Sheng
Thank you both!!
Might have better luck with COUNTROWS instead of COUNT if it is a table.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
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 |
---|---|
109 | |
97 | |
80 | |
67 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |