Forum Discussion
Creating a calculated Measure column based on If else condition of string column from another table.
- Anonymous3 years ago
Hi AbinashBehera ,
Calculated column and measure are different, you could learn more about it from
Calculated Columns and Measures in DAX - SQLBI
Do you want to return a measure in a calculated column? Here is a similar post that you can refer to:
Solved: Using a Measure in a Calculated Column - Microsoft Power BI Community
Measures are calculated on demand based on the report selections, not the refreshed the data. So your measure in the column is calculated on demand, in the case of the column it is at data refresh.
In other words, measures are dynamic, while calculated columns are static.
Also, I helped you move your posts to the Desktop forum, which you posted in the Power Query forum, the M language used in Power Query.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey,
You can use a combination of Related, Nested IF (or switch)
Assuming the column is being created in fact table and Measure1 is a column
IF (RELATED ( Dim_Table[col1] )="Base",Fact_Table[Measure1],IF (------------repeat------))
You can convert this nested IF to switch :
Thank you NandanHegde
I tried, but getting below error:
"The column 'Dim_Table.Col1' either doesn't exist or doesn't have a relationship to any table available in the current context."