Forum Discussion
How to write between function in power bi
- 8 years ago
Priya_K wrote:It worked when I use "&" instead of "and" in my formula in power query.
IF(
('Work Items - All history by month'[Inherent Risk Score]>17) &&
('Work Items - All history by month'[Inherent Risk Score]<25),
"critical",That is DAX. DAX uses a function similar to Excel - IF(condition, true, false) and as I noted above, you should use &&.
Power Query uses this - and it is case sensitive.
if condition then true else false
And if you have multiple conditions, then it is
if condition and condition and condition then true else false
Priya_K wrote:It worked when I use "&" instead of "and" in my formula in power query.
IF(
('Work Items - All history by month'[Inherent Risk Score]>17) &&
('Work Items - All history by month'[Inherent Risk Score]<25),
"critical",
That is DAX. DAX uses a function similar to Excel - IF(condition, true, false) and as I noted above, you should use &&.
Power Query uses this - and it is case sensitive.
if condition then true else false
And if you have multiple conditions, then it is
if condition and condition and condition then true else false
Thank you very much.