Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I have used below in my Power Query:
Table.AddColumn(#"Changed Type3", "Custom Consumer ID", each if each Text.Contains([DIM_OPS_CNDCT_PRODUCT_KEY], "Package SME") = true then 2 else [DIM_SEGMENT_ID])
Now, I am getting error, at
each if each Text.Contains([DIM_OPS_CNDCT_PRODUCT_KEY], "Package SME") = true
as
"Expression.Error: We cannot convert a value of type Function to type Logical.
Details:
Value=[Function]
Type=[Type]"
Can any one help me that, how can I write that IF then ELSE cuase.
Thanks,
Sandip
Solved! Go to Solution.
Hi,
According with error message the problem is here:
Try to delete thar "each"
Proud to be a Super User!
Hi,
According with error message the problem is here:
Try to delete thar "each"
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
54 | |
38 | |
31 |
User | Count |
---|---|
71 | |
64 | |
60 | |
50 | |
45 |