Forum Discussion
Huei
4 years agoFrequent Visitor
Count Measure Values
Hi Guys, I need help, Below are my current result CustomerName Status SalesAmount PY SalesAmount Customer 1 Growing 167,088 49,588 Customer 2 New 34,470 0.00 Custome...
- 4 years ago
"i change to use calculated column"
Why? I thought your goal was to do everything with measures?
Here is the formula for the calculated column version:
Column Group = SWITCH(TRUE(), ISBLANK([PY SalesAmount]) && ISBLANK([SalesAmount]),"Inactive", ISBLANK([PY SalesAmount]) && not ISBLANK([SalesAmount]),"New", not ISBLANK([PY SalesAmount]) && ISBLANK([SalesAmount]),"Lost", [SalesAmount]>[PY SalesAmount],"Increasing", [SalesAmount]<[PY SalesAmount],"Declining", "Same")
Huei
4 years agoFrequent Visitor
Okay, noted. I will check first measure. But i still having problem here, i change to use calculated column for TY sales amount and PY sales amount, but the PY Sales amount show blank. Can you please advise?
Thanks.
lbendlin
Super User
4 years ago"i change to use calculated column"
Why? I thought your goal was to do everything with measures?
Here is the formula for the calculated column version:
Column Group =
SWITCH(TRUE(),
ISBLANK([PY SalesAmount]) && ISBLANK([SalesAmount]),"Inactive",
ISBLANK([PY SalesAmount]) && not ISBLANK([SalesAmount]),"New",
not ISBLANK([PY SalesAmount]) && ISBLANK([SalesAmount]),"Lost",
[SalesAmount]>[PY SalesAmount],"Increasing",
[SalesAmount]<[PY SalesAmount],"Declining",
"Same")
- Huei4 years agoFrequent Visitor
Because yesterday the first measure you advise was referring to table column. That's why i changed to used calculated column.
var t= calculate(sum('Table'[SalesAmount])) var p= CALCULATE(sum('Table'[PY SalesAmount]))But the latest calculated column version solved my problem.
Many Thanks!!