Forum Discussion
acg
Resolver I
4 years agoBucketing values - what is missing?
I have written the following Dax, but do not understand what's missing: Bucket Gross Value = SWITCH( TRUE(), ‘Fact’[Gross Value] <=10000,"under 10'000", ‘Fact’[Gross Value] > 10000 &&’Fact...
acg
Resolver I
4 years agoHi tamerj1, it always tries to add another bracket at the end ) and both brackets are in that browish, reddish colour - indicating that it still expects something else.
- tamerj14 years ago
Community Champion
This is a calculated column right?
- tamerj14 years ago
Community Champion
I discovered many sybtax errors inside the code. It seems it was written using a non standard editor. This one should work with no errors
Bucket Gross Value = SWITCH ( TRUE (), Fact[Gross Value] <= 10000, "under 10000", Fact[Gross Value] > 10000 && Fact[Gross Value] <= 100000, "< $100000", Fact[Gross Value] > 100000 && Fact[Gross Value] <= 500000, "< $500000", Fact[Gross Value] > 500000 && Fact[Gross Value] <= 1000000, "< $1000000", Fact[Gross Value] > 1000000 && Fact[Gross Value] <= 500000000, "< $500000000", Fact[Gross Value] > 500000000 && Fact[Gross Value] <= 1000000000, "< $1000000000", Fact[Gross Value] > 1000000000 && Fact[Gross Value] <= 50000000000, "< $50000000000", "> $50000000000" )