Forum Discussion
pbiforum123
6 years agoPost Patron
Help required in Switch statement
Since the first statement for "Total Sales" consists of the dates rest of the statement is not executed. If I remove the first statement which is "Total Sales" rest of the statement is executed. Wha...
VasTg
6 years agoMemorable Member
The execution of SWITCH statements are sequential and the execution will exit at the condition matches and the rest of the statments are ignored.
Are you expecting to get two values for Date Group?
"Total Sales" plus any one of these values....."SalesOlderThanThisMonth","SalesThisMonth","SalesNextMonth","SalesFuture"
- pbiforum1236 years agoPost Patron
Thanks for responding!
Exactly this is what I was trying to say. Execution gets exits as soon as it matches the first statement as it contains all the dates. In my requirement I am expecting to show all the below values not just 2. Please help me out on this. Let me know if you have any more questions.
Total Sales
SalesOlderThanThisMonth
SalesThisMonth
SalesNextMonth
SalesFuture