Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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’[Gross Value] <=100000,"< $100'000",
‘Fact’[Gross Value] > 100000 &&’Fact’[Gross Value] <=500000,"< $500'000",
‘Fact’[Gross Value] >500000 &&’Fact’[Gross Value] <=1000000,"< $1’000'000",
‘Fact’[Gross Value] >1000000 &&’Fact’[Gross Value] <=500000000,"< $500’000’000",
‘Fact’[Gross Value] >500000000 &&’Fact’[Gross Value] <=1000000000,"< $1’000’000’000",
‘Fact’[Gross Value] >1000000000 &&’Fact’[Gross Value] <=50000000000,"< $50’000’000’000","> $50’000’000’000”
)
Solved! Go to Solution.
@tamerj1 Thank you very mich for your answer. The "$100'000" act like a text in this context. Therefore, as such the apostrphe can remain.
It turned out the problem was that it was not in direct query.
Once in direct query ot worked fine.
Thank you.
Hi 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.
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"
)
@tamerj1 Thank you very mich for your answer. The "$100'000" act like a text in this context. Therefore, as such the apostrphe can remain.
It turned out the problem was that it was not in direct query.
Once in direct query ot worked fine.
Thank you.
This is a calculated column right?
User | Count |
---|---|
60 | |
22 | |
18 | |
18 | |
16 |
User | Count |
---|---|
86 | |
54 | |
54 | |
38 | |
21 |