Forum Discussion
LyonsBI_BRL
Helper III
5 years agoGrouping Values together in IF statement
I'm completely stuck on an IF statement that I need to create here for the following scenario The scenariio is I need to create a calculated column (that or if a measure would work better that'd wor...
Greg_Deckler
Community Champion
5 years agoLyonsBI_BRL Not certain I understand 100% but try this measure along with Company in a table visual:
Measure =
VAR __TotalUnits = SUM('Table'[# of Units])
RETURN
SWITCH(TRUE(),
__TotalUnits > 1000, "DEAL",
__TotalUnits < 500, "No Deal",
"Good Deal"
)
LyonsBI_BRL
Helper III
5 years agoHey Greg thank you for getting back to me!
The formula above worked pretty well!
Speaking with the customer, what they want is if you look below at the graphic, The total number of units equals 2545. What they would like to see is if the total number is greater than 1000 than it equals a Mega Deal, if it's under 500 its "Under 500" and finally if its between the two its "Not Mega". So basically the 2545 would be grouped into one row instead multiple rows, making it a mega deal.
Is there a way to group all of them together within the formula? If so any additional help would be greatly appreciated.
Thanks!
MegaDeals = VAR _TotalUnits =SUM(Query1[[Units]]])
Return
SWITCH(TRUE(),
_TotalUnits > 1000, "Mega Deals",
_TotalUnits < 500, "Under 500",
"Not Mega"
)