cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
barak_power_bi
New Member

Translate to arabic by calculated column based on another table

Hi, 

 

I have table dim_language contain two rows:

 

Lang_Key        Lang_Name

 

     1                  English 

     2                  Arabic

 

In another table dim_field (without relationship with the first dim_language)  i have the next columns:

 

Field_Name_key      Field_name_English        Field_Name_arabic

    1                                 math                          ?????

    2                                 english                       !!!!

    3                                  history                       ######

   

I created the next measure:

Lang_Flag = if(calculate (SELECTEDVALUE(Dim_Language[Lang_Key])) =11, 2)
 
then I created the next calulated column in dim_Field:
 
Field_Name_Dynamic = if([Lang_Flag] ==1, dim_Field[Field_name_English] , dim_Field[Field_Name_arabic])
for the change the displayed contect in the report.
I want every the value of Lang_Flag is changed the contect in  Field_Name_Dynamic  as well.
 
The result show that the value of meature is changeed by the change slicer, but the contect from Field_Name_Dynamic is not.
Why? 
How I fix the Problem ?
 
 
Thanks, Barak
 
1 REPLY 1
tamerj1
Super User
Super User

Hi @barak_power_bi 

calculated columns do not interact with the filter context. What exactly are you trying to accomplish?

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors